Skip to content

Commit

Permalink
Merge branch '8.x' into 9.x
Browse files Browse the repository at this point in the history
Signed-off-by: Mior Muhammad Zaki <crynobone@gmail.com>
  • Loading branch information
crynobone committed Aug 15, 2023
2 parents 7fe26b1 + c0deeae commit af9e79b
Show file tree
Hide file tree
Showing 14 changed files with 206 additions and 1 deletion.
71 changes: 71 additions & 0 deletions CHANGELOG-7.x.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
70 changes: 70 additions & 0 deletions CHANGELOG-8.x.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion core
Submodule core updated 77 files
+1 −1 .github/workflows/analyse.yaml
+1 −0 .github/workflows/audits.yaml
+4 −7 .github/workflows/collision-tests.yaml
+1 −1 .github/workflows/coveralls.yaml
+2 −6 .github/workflows/parallel-tests.yaml
+1 −0 .github/workflows/strict-tests.yaml
+61 −0 .github/workflows/tests.yaml
+70 −0 CHANGELOG-7.x.md
+70 −0 CHANGELOG-8.x.md
+1 −1 README.md
+13 −15 composer.json
+28 −0 create-sqlite-db
+28 −0 drop-sqlite-db
+5 −5 laravel/bootstrap/app.php
+5 −10 phpstan-baseline.neon
+4 −2 phpunit.xml
+4 −1 pint.json
+10 −3 src/Bootstrap/HandleExceptions.php
+18 −3 src/Concerns/CreatesApplication.php
+5 −5 src/Concerns/Database/InteractsWithSqliteDatabaseFile.php
+1 −1 src/Concerns/Database/WithSqlite.php
+7 −47 src/Concerns/HandlesAnnotations.php
+6 −7 src/Concerns/HandlesRoutes.php
+66 −9 src/Concerns/InteractsWithPHPUnit.php
+14 −7 src/Concerns/Testing.php
+5 −5 src/Concerns/WithLaravelMigrations.php
+3 −3 src/Concerns/WithLoadMigrationsFrom.php
+1 −1 src/Concerns/WithWorkbench.php
+13 −7 src/Console/Commander.php
+20 −2 src/Contracts/Config.php
+18 −4 src/Database/MigrateProcessor.php
+1 −1 src/Exceptions/ApplicationNotAvailableException.php
+4 −2 src/Exceptions/DeprecatedException.php
+31 −14 src/Exceptions/PHPUnitErrorException.php
+14 −7 src/Foundation/Application.php
+10 −3 src/Foundation/Bootstrap/CreateVendorSymlink.php
+10 −3 src/Foundation/Bootstrap/LoadEnvironmentVariablesFromArray.php
+19 −6 src/Foundation/Bootstrap/LoadMigrationsFromArray.php
+9 −3 src/Foundation/Bootstrap/StartWorkbench.php
+67 −10 src/Foundation/Config.php
+2 −2 src/Foundation/Console/Concerns/InteractsWithIO.php
+24 −20 src/Foundation/Console/CreateSqliteDbCommand.php
+0 −46 src/Foundation/Console/DevToolCommand.php
+22 −20 src/Foundation/Console/DropSqliteDbCommand.php
+154 −0 src/Foundation/Console/PurgeSkeletonCommand.php
+11 −4 src/Foundation/Console/ServeCommand.php
+4 −0 src/Foundation/Console/TestCommand.php
+3 −1 src/Foundation/Console/TestFallbackCommand.php
+0 −0 src/Foundation/Console/stubs/database.sqlite.example
+27 −0 src/Foundation/Events/ServeCommandEnded.php
+25 −0 src/Foundation/Events/ServeCommandStarted.php
+1 −1 src/Foundation/PackageManifest.php
+1 −1 src/Foundation/TestbenchServiceProvider.php
+7 −0 src/Http/Middleware/VerifyCsrfToken.php
+43 −11 src/PHPUnit/TestCase.php
+2 −1 src/TestCase.php
+1 −1 src/Workbench/Composer.php
+3 −33 src/Workbench/Console/CreateSqliteDbCommand.php
+3 −32 src/Workbench/Console/DropSqliteDbCommand.php
+18 −5 src/Workbench/Console/InstallCommand.php
+27 −0 src/Workbench/Events/WorkbenchInstallEnded.php
+25 −0 src/Workbench/Events/WorkbenchInstallStarted.php
+29 −11 src/helpers.php
+3 −0 testbench.yaml
+8 −1 tests/ApplicationTest.php
+29 −4 tests/CommanderTest.php
+16 −0 tests/Foundation/ConfigTest.php
+43 −2 tests/Foundation/Console/CreateSqliteDbCommandTest.php
+43 −2 tests/Foundation/Console/DropSqliteDbCommandTest.php
+3 −3 tests/Foundation/PackageManifestTest.php
+18 −33 tests/HelpersTest.php
+96 −0 tests/PhpUnit9DeprecationsTest.php
+12 −2 tests/TestCaseTest.php
+18 −0 tests/WithFakerTest.php
+2 −2 tests/Workbench/Console/CreateSqliteDbCommandTest.php
+2 −2 tests/Workbench/Console/DropSqliteDbCommandTest.php
+62 −0 tests/Workbench/HelpersTest.php
1 change: 1 addition & 0 deletions phpunit.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
<group>commander</group>
<group>core</group>
<group>database</group>
<group>workbench</group>
</exclude>
</groups>
<php>
Expand Down
1 change: 1 addition & 0 deletions sync.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@ git submodule foreach git checkout $BRANCH
git submodule foreach git pull

cp -rf core/testbench.yaml ./
cp -rf core/workbench ./
3 changes: 3 additions & 0 deletions testbench.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,6 @@ providers:

env:
APP_NAME: "Testbench"

purge:
directories: public/vendor/*
3 changes: 3 additions & 0 deletions workbench/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.env
.env.dist
.env.example
Empty file added workbench/app/.gitkeep
Empty file.
13 changes: 13 additions & 0 deletions workbench/app/Providers/TestbenchServiceProvider.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?php

namespace Workbench\App\Providers;

use Illuminate\Support\ServiceProvider;

class TestbenchServiceProvider extends ServiceProvider
{
public function register()
{
$this->loadMigrationsFrom(realpath(__DIR__.'/../../database/migrations'));
}
}
Empty file.
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
<?php

use Carbon\Carbon;
use Illuminate\Database\Migrations\Migration;

class CreateTestbenchUsersTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('testbench_users', function ($table) {
$table->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');
}
}
Empty file.

0 comments on commit af9e79b

Please sign in to comment.