From ad57dc19480488af4900d9ba969bfef6d7db79c0 Mon Sep 17 00:00:00 2001 From: Alexandre D'Eschambeault Date: Tue, 26 Mar 2024 09:48:16 -0400 Subject: [PATCH 1/5] build(deps): add Laravel 11 support --- .github/workflows/tests.yml | 4 +++- composer.json | 10 +++++----- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 3cec8dc..d5a26e1 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -10,11 +10,13 @@ jobs: fail-fast: true matrix: php: [8.1, 8.2] - laravel: [10.*] + laravel: [10.*, 11.*] dependency-version: [prefer-lowest, prefer-stable] include: - laravel: 10.* testbench: 8.* + - laravel: 11.* + testbench: 9.* name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.dependency-version }} diff --git a/composer.json b/composer.json index 619ffab..3b8126c 100644 --- a/composer.json +++ b/composer.json @@ -16,16 +16,16 @@ }, "require": { "php": "^8.1", - "illuminate/contracts": "^10.0", - "illuminate/http": "^10.0", - "illuminate/support": "^10.0", - "illuminate/view": "^10.0" + "illuminate/contracts": "^10.0|^11.0", + "illuminate/http": "^10.0|^11.0", + "illuminate/support": "^10.0|^11.0", + "illuminate/view": "^10.0|^11.0" }, "require-dev": { "exolnet/phpcs-config": "^2.0", "laravel/pint": "^1.1", "mockery/mockery": "^1.4", - "orchestra/testbench": "^8.0", + "orchestra/testbench": "^8.0|^9.0", "phpunit/phpunit": "^9.3.3", "squizlabs/php_codesniffer": "^3.6" }, From e9a3c246bc2f8abaeaebf771ec2d9047859973cb Mon Sep 17 00:00:00 2001 From: Alexandre D'Eschambeault Date: Tue, 26 Mar 2024 09:59:43 -0400 Subject: [PATCH 2/5] ci: laravel 11 doesn't support php 8.1 --- .github/workflows/tests.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index d5a26e1..06948b0 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -12,6 +12,9 @@ jobs: php: [8.1, 8.2] laravel: [10.*, 11.*] dependency-version: [prefer-lowest, prefer-stable] + exclude: + - php: 8.1 + laravel: 11.* include: - laravel: 10.* testbench: 8.* From a85b34b903dca6621a58bdae1c0d0c67785875e5 Mon Sep 17 00:00:00 2001 From: Alexandre D'Eschambeault Date: Tue, 26 Mar 2024 10:15:53 -0400 Subject: [PATCH 3/5] build(deps): update phpunit to v10 --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 3b8126c..f6d13ca 100644 --- a/composer.json +++ b/composer.json @@ -26,7 +26,7 @@ "laravel/pint": "^1.1", "mockery/mockery": "^1.4", "orchestra/testbench": "^8.0|^9.0", - "phpunit/phpunit": "^9.3.3", + "phpunit/phpunit": "^10.5", "squizlabs/php_codesniffer": "^3.6" }, "autoload": { From 92eaf9a1d2bb29467427c4c4b973991bea97a6c5 Mon Sep 17 00:00:00 2001 From: Alexandre D'Eschambeault Date: Tue, 26 Mar 2024 11:18:05 -0400 Subject: [PATCH 4/5] test: migrate phpunit.xml to v10 format --- phpunit.xml.dist | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 36239d0..53bceab 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -1,22 +1,17 @@ - +> tests - + src/ - + From ea16d745eb966d868fb6160c2aeaa0d05bcf369b Mon Sep 17 00:00:00 2001 From: Alexandre D'Eschambeault Date: Tue, 26 Mar 2024 11:19:05 -0400 Subject: [PATCH 5/5] test: provider should be static in phpunit v10 --- tests/Feature/BladeTest.php | 2 +- tests/Unit/Strategy/CallbackTest.php | 2 +- tests/Unit/Strategy/ConfigTest.php | 2 +- tests/Unit/Strategy/DateTest.php | 2 +- tests/Unit/Strategy/EnvironmentTest.php | 2 +- tests/Unit/Strategy/HostnameTest.php | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/Feature/BladeTest.php b/tests/Feature/BladeTest.php index 07a4889..21433a8 100644 --- a/tests/Feature/BladeTest.php +++ b/tests/Feature/BladeTest.php @@ -30,7 +30,7 @@ public function testDirective(string $directive, bool $state): void /** * @return \Generator */ - public function provideTestDirective(): Generator + public static function provideTestDirective(): Generator { yield ['launch', true]; yield ['launch', false]; diff --git a/tests/Unit/Strategy/CallbackTest.php b/tests/Unit/Strategy/CallbackTest.php index 502ff9b..cc5da84 100644 --- a/tests/Unit/Strategy/CallbackTest.php +++ b/tests/Unit/Strategy/CallbackTest.php @@ -26,7 +26,7 @@ public function testLaunch($expected): void /** * @return \Generator */ - public function provideTestLaunch(): Generator + public static function provideTestLaunch(): Generator { yield [true]; yield [false]; diff --git a/tests/Unit/Strategy/ConfigTest.php b/tests/Unit/Strategy/ConfigTest.php index 3426bb4..e09e16e 100644 --- a/tests/Unit/Strategy/ConfigTest.php +++ b/tests/Unit/Strategy/ConfigTest.php @@ -44,7 +44,7 @@ public function testLaunch(bool $expected): void /** * @return array */ - public function provideTestLaunch(): array + public static function provideTestLaunch(): array { return [ [true], diff --git a/tests/Unit/Strategy/DateTest.php b/tests/Unit/Strategy/DateTest.php index a2d8ce7..e7ecd1d 100644 --- a/tests/Unit/Strategy/DateTest.php +++ b/tests/Unit/Strategy/DateTest.php @@ -49,7 +49,7 @@ public function testLaunch($date, $operator, $expected): void /** * @return \Generator */ - public function provideTestLaunch(): Generator + public static function provideTestLaunch(): Generator { yield ['2019-12-31', '<', true]; yield ['2020-01-01', '<', false]; diff --git a/tests/Unit/Strategy/EnvironmentTest.php b/tests/Unit/Strategy/EnvironmentTest.php index 24ca496..e9a1124 100644 --- a/tests/Unit/Strategy/EnvironmentTest.php +++ b/tests/Unit/Strategy/EnvironmentTest.php @@ -46,7 +46,7 @@ public function testLaunch($environments, string $actualEnvironment, bool $expec /** * @return \Generator */ - public function provideTestLaunch(): Generator + public static function provideTestLaunch(): Generator { yield ['local', 'local', true]; yield ['local', 'production', false]; diff --git a/tests/Unit/Strategy/HostnameTest.php b/tests/Unit/Strategy/HostnameTest.php index 301be41..ad5f87f 100644 --- a/tests/Unit/Strategy/HostnameTest.php +++ b/tests/Unit/Strategy/HostnameTest.php @@ -33,7 +33,7 @@ public function testLaunch($hosts, string $actualHost, bool $expectedLaunch): vo /** * @return \Generator */ - public function provideTestLaunch(): Generator + public static function provideTestLaunch(): Generator { yield ['localhost', 'localhost', true]; yield ['localhost', 'bento.dev', false];