From 3a1034bf665c19eb9bd0c42aed4d63b95ddd4f44 Mon Sep 17 00:00:00 2001 From: Alexandre D'Eschambeault Date: Tue, 26 Mar 2024 09:49:46 -0400 Subject: [PATCH 1/5] build(deps): add Laravel 11 support --- .github/workflows/tests.yml | 4 +++- composer.json | 6 +++--- 2 files changed, 6 insertions(+), 4 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 4811edb..3815dd7 100644 --- a/composer.json +++ b/composer.json @@ -17,12 +17,12 @@ ], "require": { "php": "^8.1", - "illuminate/console": "^10.0", - "illuminate/support": "^10.0" + "illuminate/console": "^10.0|^11.0", + "illuminate/support": "^10.0|^11.0" }, "require-dev": { "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 13716dbf26a046fbfb3cef0eff894e0ca5b7a3a3 Mon Sep 17 00:00:00 2001 From: Alexandre D'Eschambeault Date: Tue, 26 Mar 2024 10:00:14 -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 0c581a88b40e73abce3774f06af1c769d7b7d4d7 Mon Sep 17 00:00:00 2001 From: Alexandre D'Eschambeault Date: Tue, 26 Mar 2024 10:16:10 -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 3815dd7..b7de310 100644 --- a/composer.json +++ b/composer.json @@ -23,7 +23,7 @@ "require-dev": { "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 af132dbd64476d39633a06e521dd91c04e29510e Mon Sep 17 00:00:00 2001 From: Alexandre D'Eschambeault Date: Tue, 26 Mar 2024 10:35:43 -0400 Subject: [PATCH 4/5] test: migrate phpunit.xml to v10 format --- phpunit.xml.dist | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) diff --git a/phpunit.xml.dist b/phpunit.xml.dist index f2eebe0..53bceab 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -1,22 +1,17 @@ - +> tests - - + + src/ - - + + From ccddb6db9d982664384f44e43c42d9459f11989c Mon Sep 17 00:00:00 2001 From: Alexandre D'Eschambeault Date: Tue, 26 Mar 2024 11:13:39 -0400 Subject: [PATCH 5/5] test: abstract classes with the Test suffix are deprecated --- tests/Unit/Console/DbUpgradeCommandTest.php | 2 +- tests/Unit/{UnitTest.php => TestCase.php} | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) rename tests/Unit/{UnitTest.php => TestCase.php} (60%) diff --git a/tests/Unit/Console/DbUpgradeCommandTest.php b/tests/Unit/Console/DbUpgradeCommandTest.php index 6a93094..6553c66 100644 --- a/tests/Unit/Console/DbUpgradeCommandTest.php +++ b/tests/Unit/Console/DbUpgradeCommandTest.php @@ -7,7 +7,7 @@ use Mockery as m; use Symfony\Component\Process\ExecutableFinder; -class DbUpgradeCommandTest extends UnitTest +class DbUpgradeCommandTest extends TestCase { /** * @var \Illuminate\Filesystem\Filesystem|\Mockery\LegacyMockInterface|\Mockery\MockInterface diff --git a/tests/Unit/UnitTest.php b/tests/Unit/TestCase.php similarity index 60% rename from tests/Unit/UnitTest.php rename to tests/Unit/TestCase.php index fc437fe..99bf9c6 100644 --- a/tests/Unit/UnitTest.php +++ b/tests/Unit/TestCase.php @@ -3,9 +3,9 @@ namespace Exolnet\DbUpgrade\Tests\Unit; use Mockery; -use PHPUnit\Framework\TestCase; +use PHPUnit\Framework\TestCase as BaseTestCase; -abstract class UnitTest extends TestCase +abstract class TestCase extends BaseTestCase { public function tearDown(): void {