Skip to content

Commit

Permalink
Merge branch '9.x' into 10.x
Browse files Browse the repository at this point in the history
Signed-off-by: Mior Muhammad Zaki <[email protected]>
  • Loading branch information
crynobone committed Aug 14, 2024
2 parents 7891922 + 6084d07 commit f69461b
Show file tree
Hide file tree
Showing 20 changed files with 543 additions and 47 deletions.
4 changes: 1 addition & 3 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@ jobs:
steps:
- name: Checkout repository and submodules
uses: actions/checkout@v4
with:
submodules: recursive

- name: Setup PHP
uses: shivammathur/setup-php@v2
Expand All @@ -46,7 +44,7 @@ jobs:
uses: "ramsey/composer-install@v3"
with:
dependency-versions: "${{ matrix.dependencies }}"
composer-options: "--prefer-dist --no-cache --with=phpunit/phpunit:${{ matrix.phpunit }}"
composer-options: "--no-cache --with=phpunit/phpunit:${{ matrix.phpunit }}"

- name: Installed dependencies
run: |
Expand Down
4 changes: 0 additions & 4 deletions .gitmodules

This file was deleted.

134 changes: 134 additions & 0 deletions CHANGELOG-8.x.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,140 @@

This changelog references the relevant changes (bug and security fixes) done to `orchestra/testbench`.

## 8.25.0

Released: 2024-08-14

### Changes

* Update minimum support for Testbench Core v8.26.0+. ([v8.25.0...v8.26.0](https://github.com/orchestral/testbench-core/compare/v8.25.0...v8.26.0))

#### Testbench Changes

##### Changes

* Update `Orchestra\Testbench\Foundation\Console\Actions\GeneratesFile` to remove `.gitkeep` file when directory contain one or more files.
* Code Improvements.

##### Fixes

* Fixes `InteractsWithPublishedFiles` should only flush published files within `database/migrations` directory.

## 8.24.0

Released: 2024-07-13

### Changes

* Update minimum support for Testbench Core v8.25.0+. ([v8.24.3...v8.25.0](https://github.com/orchestral/testbench-core/compare/v8.24.3...v8.25.0))

#### Testbench Changes

##### Added

* Added new attributes:
- `Orchestra\Testbench\Attributes\ResolvesLaravel`
- `Orchestra\Testbench\Attributes\UsesFrameworkConfiguration`
* Allows to discover `factories` using Workbench to map `Workbench\App\Models` to `Workbench\Database\Factories` classes.
* Allows to auto discover console command classes from `workbench/app/Console/Commands`.

##### Changes

* Implements `JsonSerializable` to `Orchestra\Testbench\Foundation\UndefinedValue`.
* Update skeleton to use `workbench` as default environment value.
* Allow `Orchestra\Testbench\Attributes\Define` and `Orchestra\Testbench\Attributes\DefineEnvironment` to be used on the class level by [@danjohnson95](https://github.com/danjohnson95)

##### Fixes

* Ensure `usesTestingFeature()` attribute registration is loaded before class attributes instead of method attributes.

## 8.23.2

Released: 2024-06-04

### Changes

* Update minimum support for Testbench Core v8.24.3+. ([v8.24.2...v8.24.3](https://github.com/orchestral/testbench-core/compare/v8.24.2...v8.24.3))

#### Testbench Changes

##### Fixes

* Fixes `Orchestra\Testbench\Workench\Workbench::applicationExceptionHandler()` usage to detect `Workbench\App\Exceptions\Handler` class.

## 8.23.1

Released: 2024-06-01

### Changes

* Update minimum support for Testbench Core v8.24.2+. ([v8.24.0...v8.24.2](https://github.com/orchestral/testbench-core/compare/v8.24.0...v8.24.2))

#### Testbench Changes

##### Changes

* Utilise `Orchestra\Testbench\package_path()` function instead of `TESTBENCH_WORKING_PATH` constant.

##### Fixes

* Fixes `Orchestra\Testbench\Attributes\RequiresLaravel` attribute usage.

## 8.23.0

Released: 2024-05-21

### Changes

* Update minimum support for Testbench Core v8.24.0+. ([v8.23.9...v8.24.0](https://github.com/orchestral/testbench-core/compare/v8.23.9...v8.24.0))

#### Testbench Changes

##### Changes

* Uses `TESTBENCH_WORKING_PATH` from environment variable before fallback to `getcwd()`.
* PHPStan Improvements.

##### Fixes

* Backport fixes to routing registration using macro with Workbench.

## 8.22.3

Released: 2024-04-16

### Changes

* Update minimum support for Testbench Core v8.23.9+. ([v8.23.5...v8.23.9](https://github.com/orchestral/testbench-core/compare/v8.23.5...v8.23.9))

#### Testbench Changes

###### Changes

* Allows `Orchestra\Testbench\remote` to accept `$env` with either `array` or `string`.
* Includes `TESTBENCH_PACKAGE_REMOTE=true` when running command using `Orchestra\Testbench\remote`.
* Flush Static Improvements.
* Revert setting `workbench` environment variable when Testbench CLI is used outside of testing.

###### Fixes

* Fixes `serve` command.
* Fixes `runningInUnitTests()` returning `true` when not running tests via Testbench CLI.

## 8.22.2

Released: 2024-03-25

### Changes

* Update minimum support for Testbench Core v8.23.5+. ([v8.23.4...v8.23.5](https://github.com/orchestral/testbench-core/compare/v8.23.4...v8.23.5))

#### Testbench Changes

##### Fixes

* Fixes `RefreshDatabase` to be executed on `tearDown()` only limited when ad-hoc migrations was added during test.

## 8.22.1

Released: 2024-03-19
Expand Down
158 changes: 158 additions & 0 deletions CHANGELOG-9.x.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,164 @@

This changelog references the relevant changes (bug and security fixes) done to `orchestra/testbench`.

## 9.3.0

Released: 2024-08-14

### Changes

* Update minimum support for Testbench Core v9.3.0+. ([v9.2.0...v9.3.0](https://github.com/orchestral/testbench-core/compare/v9.2.0...v9.3.0))

#### Testbench Changes

##### Changes

* Update `Orchestra\Testbench\Foundation\Console\Actions\GeneratesFile` to remove `.gitkeep` file when directory contain one or more files.
* Code Improvements.

##### Fixes

* Fixes `InteractsWithPublishedFiles` should only flush published files within `database/migrations` directory.

## 9.2.0

Released: 2024-07-13

### Changes

* Update minimum support for Testbench Core v9.2.0+. ([v9.1.3...v9.2.0](https://github.com/orchestral/testbench-core/compare/v9.1.3...v9.2.0))

#### Testbench Changes

##### Added

* Added new attributes:
- `Orchestra\Testbench\Attributes\ResolvesLaravel`
- `Orchestra\Testbench\Attributes\UsesFrameworkConfiguration`
* Allows to discover `factories` using Workbench to map `Workbench\App\Models` to `Workbench\Database\Factories` classes.
* Allows to auto discover console command classes from `workbench/app/Console/Commands`.

##### Changes

* Bump minimum support to Laravel Framework v11.11.
* Implements `JsonSerializable` to `Orchestra\Testbench\Foundation\UndefinedValue`.
* Update skeleton to use `workbench` as default environment value.
* Allow `Orchestra\Testbench\Attributes\Define` and `Orchestra\Testbench\Attributes\DefineEnvironment` to be used on the class level by [@danjohnson95](https://github.com/danjohnson95)

##### Fixes

* Ensure `usesTestingFeature()` attribute registration is loaded before class attributes instead of method attributes.

## 9.1.2

Released: 2024-06-04

### Changes

* Update minimum support for Testbench Core v9.1.3+. ([v9.1.2...v9.1.3](https://github.com/orchestral/testbench-core/compare/v9.1.2...v9.1.3))

#### Testbench Changes

##### Fixes

* Fixes `Orchestra\Testbench\Workench\Workbench::applicationExceptionHandler()` usage to detect `Workbench\App\Exceptions\Handler` class.
* Fixes `Orchestra\Testbench\Console\Kernel` and `Orchestra\Testbench\Foundation\Console\Kernel` unable to discover commands.

## 9.1.1

Released: 2024-06-01

### Changes

* Update minimum support for Testbench Core v9.1.2+. ([v9.1.0...v9.1.2](https://github.com/orchestral/testbench-core/compare/v9.1.0...v9.1.2))

#### Testbench Changes

##### Changes

* Utilise `Orchestra\Testbench\package_path()` function instead of `TESTBENCH_WORKING_PATH` constant.
* Update configuration to match Laravel Framework v11.8.0,

##### Fixes

* Fixes `Orchestra\Testbench\Attributes\RequiresLaravel` attribute usage.

## 9.1.0

Released: 2024-05-21

### Changes

* Update minimum support for Testbench Core v9.1.0+. ([v9.0.13...v9.1.0](https://github.com/orchestral/testbench-core/compare/v9.0.13...v9.1.0))

#### Testbench Changes

##### Changes

* Uses `TESTBENCH_WORKING_PATH` from environment variable before fallback to `getcwd()`.
* PHPStan Improvements.
* Add support for PHPUnit 11.1.
* Update skeleton to match v11.0.7.

##### Fixes

* Fixes routing registration using macro with Workbench.

## 9.0.4

Released: 2024-04-16

### Changes

* Update minimum support for Testbench Core v9.0.13+. ([v9.0.9...v9.0.13](https://github.com/orchestral/testbench-core/compare/v9.0.9...v9.0.13))

#### Testbench Changes

##### Changes

* Allows `Orchestra\Testbench\remote` to accept `$env` with either `array` or `string`.
* Includes `TESTBENCH_PACKAGE_REMOTE=true` when running command using `Orchestra\Testbench\remote`.
* Flush Static Improvements.
* Revert setting `workbench` environment variable when Testbench CLI is used outside of testing.

##### Fixes

* Fixes `serve` command.
* Fixes `runningInUnitTests()` returning `true` when not running tests via Testbench CLI.

## 9.0.3

Released: 2024-03-27

### Changes

* Update minimum support for Testbench Core v9.0.9+. ([v9.0.7...v9.0.9](https://github.com/orchestral/testbench-core/compare/v9.0.7...v9.0.9))
* Update minimum support for Laravel Framework `11.1.0`.

#### Testbench Changes

##### Changes

* Add support for `HASH_VERIFY` environment variables.

##### Fixes

* Force reset `RefreshDatabaseState` when using `LazilyRefreshDatabase` with SQLite `:in-memory:` database connections.

## 9.0.2

Released: 2024-03-25

### Changes

* Update minimum support for Testbench Core v9.0.7+. ([v9.0.6...v9.0.7](https://github.com/orchestral/testbench-core/compare/v9.0.6...v9.0.7))

#### Testbench Changes

##### Fixes

* Fixes `RefreshDatabase` to be executed on `tearDown()` only limited when ad-hoc migrations was added during test.

## 9.0.1

Released: 2024-03-19
Expand Down
34 changes: 13 additions & 21 deletions bin/sync
Original file line number Diff line number Diff line change
Expand Up @@ -10,37 +10,29 @@ $files = new Illuminate\Filesystem\Filesystem();

echo ">>>> Checkout branch {$BRANCH}".PHP_EOL;

Illuminate\Support\Collection::make([
"git checkout {$BRANCH}",
"git submodule init",
"git submodule foreach git reset --hard HEAD",
"git submodule foreach git checkout $BRANCH",
"git submodule foreach git pull",
])->each(function ($command) use ($workingPath) {
Symfony\Component\Process\Process::fromShellCommandline($command, $workingPath)->mustRun();
});

$files->copy("{$workingPath}/core/testbench.yaml", "{$workingPath}/testbench.yaml");
$files->copy("{$workingPath}/vendor/orchestra/testbench-core/testbench.yaml", "{$workingPath}/testbench.yaml");

Illuminate\Support\Collection::make([
...$files->glob("{$workingPath}/core/workbench/app/View/Components/*"),
...$files->allFiles("{$workingPath}/vendor/orchestra/testbench-core/workbench/app/"),
])->flatten()
->filter(fn ($file) => is_file($file))
->each(function ($file) use ($files, $workingPath) {
$files->copy($file, "{$workingPath}/workbench".Illuminate\Support\Str::after($file, "{$workingPath}/core/workbench"));
$filename = "{$workingPath}/workbench".Illuminate\Support\Str::after($file, "{$workingPath}/vendor/orchestra/testbench-core/workbench");
$files->ensureDirectoryExists(Illuminate\Support\Str::before($filename, basename($filename)));
$files->copy($file, $filename);
});

Illuminate\Support\Collection::make([
...$files->glob("{$workingPath}/core/workbench/bootstrap/*"),
...$files->glob("{$workingPath}/core/workbench/config/*.php"),
...$files->glob("{$workingPath}/core/workbench/config/*/*.php"),
...$files->glob("{$workingPath}/core/workbench/database/migrations/*"),
...$files->glob("{$workingPath}/core/workbench/lang/en/*"),
...$files->glob("{$workingPath}/core/workbench/routes/*"),
...$files->glob("{$workingPath}/core/workbench/resources/views/components/*"),
...$files->glob("{$workingPath}/core/workbench/resources/views/*"),
...$files->allFiles("{$workingPath}/vendor/orchestra/testbench-core/workbench/config/"),
...$files->allFiles("{$workingPath}/vendor/orchestra/testbench-core/workbench/database/"),
...$files->allFiles("{$workingPath}/vendor/orchestra/testbench-core/workbench/lang/"),
...$files->allFiles("{$workingPath}/vendor/orchestra/testbench-core/workbench/routes/"),
...$files->allFiles("{$workingPath}/vendor/orchestra/testbench-core/workbench/resources/"),
])->flatten()
->filter(fn ($file) => is_file($file))
->each(function ($file) use ($files, $workingPath) {
$files->copy($file, "{$workingPath}/workbench".Illuminate\Support\Str::after($file, "{$workingPath}/core/workbench"));
$filename = "{$workingPath}/workbench".Illuminate\Support\Str::after($file, "{$workingPath}/vendor/orchestra/testbench-core/workbench");
$files->ensureDirectoryExists(Illuminate\Support\Str::before($filename, basename($filename)));
$files->copy($file, $filename);
});
Loading

0 comments on commit f69461b

Please sign in to comment.