diff --git a/CHANGELOG-7.x.md b/CHANGELOG-7.x.md index ab63fa2b..873eadc9 100644 --- a/CHANGELOG-7.x.md +++ b/CHANGELOG-7.x.md @@ -2,6 +2,77 @@ This changelog references the relevant changes (bug and security fixes) done to `orchestra/testbench`. +## 7.28.0 + +Released: 2023-08-15 + +### Changes + +* Update minimum support for Testbench Core v7.28.0+. ([v7.27.0...v7.28.0](https://github.com/orchestral/testbench-core/compare/v7.27.0...v7.28.0)) + +#### Testbench Changes + +##### Added + +* Added `package:purge-skeleton` command. +* Added `Orchestra\Testbench\Concerns\Database\InteractsWithSqliteDatabaseFile` trait. +* Added `Orchestra\Testbench\package_path()` function. +* Added support for `orchestra/workbench`. + +##### Changes + +* Rename `Orchestra\Testbench\Workbench\Bootstrap\StartWorkbench` to `Orchestra\Testbench\Foundation\Bootstrap\StartWorkbench`. + +##### Fixes + +* Fixes `serve` command usage. +* Fixes class namespace. + +## 7.27.0 + +Released: 2023-08-12 + +### Changes + +* Update minimum support for Testbench Core v7.27.0+. ([v7.26.2...v7.27.0](https://github.com/orchestral/testbench-core/compare/v7.26.2...v7.27.0)) + +#### Testbench Changes + +##### Added + +* Added following events: + - `Orchestra\Testbench\Foundation\Events\ServeCommandStarted` + - `Orchestra\Testbench\Foundation\Events\ServeCommandEnded` + - `Orchestra\Testbench\Workbench\Events\WorkbenchInstallStarted` + - `Orchestra\Testbench\Workbench\Events\WorkbenchInstallEnded` + +##### Changes + +* Change `HandlesRoutes` loading sequence to match common Laravel bootstrap steps. +* Refactor `HandlesAnnotations` and `InteractsWithPHPUnit` traits. +* Workbench integration improvements. +* Update `workbench` configuration schema. + +##### Fixes + +* Fixes `Illuminate\Foundation\Application::runningUnitTests()` detection. + +## 7.26.2 + +Released: 2023-08-10 + +### Changes + +* Bump minimum `laravel/framework` to `9.52.15`. +* Update minimum support for Testbench Core v7.26.2+. ([v7.26.1...v7.26.2](https://github.com/orchestral/testbench-core/compare/v7.26.1...v7.26.2)) + +#### Testbench Changes + +##### Fixes + +* Fixes `app()->environment()` detection when creating application `Orchestra\Testbench\Concerns\CreatesApplication` outside of `PHPUnit`. +* Fixes error `Undefined array key "autoload-dev"` when executing `workbench:install` command. + ## 7.26.1 Released: 2023-08-09 diff --git a/CHANGELOG-8.x.md b/CHANGELOG-8.x.md index a6f24c38..1bbb4923 100644 --- a/CHANGELOG-8.x.md +++ b/CHANGELOG-8.x.md @@ -2,6 +2,76 @@ This changelog references the relevant changes (bug and security fixes) done to `orchestra/testbench`. +## 8.8.0 + +Released: 2023-08-15 + +### Changes + +* Update minimum support for Testbench Core v8.8.0+. ([v8.7.0...v8.8.0](https://github.com/orchestral/testbench-core/compare/v8.7.0...v8.8.0)) + +#### Testbench Changes + +##### Added + +* Added `package:purge-skeleton` command. +* Added `Orchestra\Testbench\Concerns\Database\InteractsWithSqliteDatabaseFile` trait. +* Added `Orchestra\Testbench\package_path()` function. +* Added support for `orchestra/workbench`. + +##### Changes + +* Rename `Orchestra\Testbench\Workbench\Bootstrap\StartWorkbench` to `Orchestra\Testbench\Foundation\Bootstrap\StartWorkbench`. + +##### Fixes + +* Fixes `serve` command usage. +* Fixes class namespace. + +## 8.7.0 + +Released: 2023-08-12 + +### Changes + +* Update minimum support for Testbench Core v8.7.0+. ([v8.6.2...v8.7.0](https://github.com/orchestral/testbench-core/compare/v8.6.2...v8.7.0)) + +#### Testbench Changes + +##### Added + +* Added following events: + - `Orchestra\Testbench\Foundation\Events\ServeCommandStarted` + - `Orchestra\Testbench\Foundation\Events\ServeCommandEnded` + - `Orchestra\Testbench\Workbench\Events\WorkbenchInstallStarted` + - `Orchestra\Testbench\Workbench\Events\WorkbenchInstallEnded` + +##### Changes + +* Change `HandlesRoutes` loading sequence to match common Laravel bootstrap steps. +* Refactor `HandlesAnnotations` and `InteractsWithPHPUnit` traits. +* Workbench integration improvements. +* Update `workbench` configuration schema. + +##### Fixes + +* Fixes `Illuminate\Foundation\Application::runningUnitTests()` detection. + +## 8.6.3 + +Released: 2023-08-10 + +### Changes + +* Update minimum support for Testbench Core v8.6.2+. ([v8.6.1...v8.6.2](https://github.com/orchestral/testbench-core/compare/v8.6.1...v8.6.2)) + +#### Testbench Changes + +##### Fixes + +* Fixes `app()->environment()` detection when creating application `Orchestra\Testbench\Concerns\CreatesApplication` outside of `PHPUnit`. +* Fixes error `Undefined array key "autoload-dev"` when executing `workbench:install` command. + ## 8.6.2 Released: 2023-08-09 diff --git a/composer.json b/composer.json index e4590aeb..c57625b3 100644 --- a/composer.json +++ b/composer.json @@ -25,6 +25,7 @@ "laravel/framework": "11.x-dev", "mockery/mockery": "^1.5.1", "orchestra/testbench-core": "9.x-dev", + "orchestra/workbench": "dev-next", "phpunit/phpunit": ">=10.1.0 <10.4.0", "symfony/process": "^6.2", "symfony/yaml": "^6.2", diff --git a/core b/core index 5fd00538..a4a724e6 160000 --- a/core +++ b/core @@ -1 +1 @@ -Subproject commit 5fd00538387a458336f62cdd0ff77f406c9e04c9 +Subproject commit a4a724e6cefdbdd022a9b9737131c175ac78b76a diff --git a/phpunit.xml b/phpunit.xml index 7791e7a8..9db761c4 100644 --- a/phpunit.xml +++ b/phpunit.xml @@ -19,6 +19,7 @@ commander core database + workbench diff --git a/sync.sh b/sync.sh index ba74d281..ea27c089 100755 --- a/sync.sh +++ b/sync.sh @@ -10,3 +10,4 @@ git submodule foreach git checkout $BRANCH git submodule foreach git pull cp -rf core/testbench.yaml ./ +cp -rf core/workbench ./ diff --git a/testbench.yaml b/testbench.yaml index 789de15d..8931a5bc 100644 --- a/testbench.yaml +++ b/testbench.yaml @@ -3,3 +3,6 @@ providers: env: APP_NAME: "Testbench" + +purge: + directories: public/vendor/* diff --git a/workbench/.gitignore b/workbench/.gitignore new file mode 100644 index 00000000..6088e424 --- /dev/null +++ b/workbench/.gitignore @@ -0,0 +1,3 @@ +.env +.env.dist +.env.example diff --git a/workbench/app/.gitkeep b/workbench/app/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/workbench/app/Providers/TestbenchServiceProvider.php b/workbench/app/Providers/TestbenchServiceProvider.php new file mode 100644 index 00000000..30293b64 --- /dev/null +++ b/workbench/app/Providers/TestbenchServiceProvider.php @@ -0,0 +1,13 @@ +loadMigrationsFrom(realpath(__DIR__.'/../../database/migrations')); + } +} diff --git a/workbench/database/factories/.gitkeep b/workbench/database/factories/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/workbench/database/migrations/.gitkeep b/workbench/database/migrations/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/workbench/database/migrations/2013_07_26_182750_create_testbench_users_table.php b/workbench/database/migrations/2013_07_26_182750_create_testbench_users_table.php new file mode 100644 index 00000000..e1a44e52 --- /dev/null +++ b/workbench/database/migrations/2013_07_26_182750_create_testbench_users_table.php @@ -0,0 +1,42 @@ +increments('id'); + $table->string('email'); + $table->string('password'); + + $table->timestamps(); + }); + + $now = Carbon::now(); + + DB::table('testbench_users')->insert([ + 'email' => 'crynobone@gmail.com', + 'password' => Hash::make('123'), + 'created_at' => $now, + 'updated_at' => $now, + ]); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::drop('testbench_users'); + } +} diff --git a/workbench/database/seeders/.gitkeep b/workbench/database/seeders/.gitkeep new file mode 100644 index 00000000..e69de29b