From 205c8e40f7d2b1a6d51536c424ec4fad6874c31f Mon Sep 17 00:00:00 2001 From: Alexandre D'Eschambeault Date: Tue, 26 Mar 2024 09:52:12 -0400 Subject: [PATCH 1/5] build(deps): add Laravel 11 support --- .github/workflows/tests.yml | 2 +- composer.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 3264ade..f5c2ae4 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -10,7 +10,7 @@ jobs: fail-fast: true matrix: php: [8.1, 8.2] - laravel: [10.*] + laravel: [10.*, 11.*] dependency-version: [prefer-lowest, prefer-stable] name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.dependency-version }} diff --git a/composer.json b/composer.json index 73594c8..668b88a 100644 --- a/composer.json +++ b/composer.json @@ -10,7 +10,7 @@ ], "require": { "php": "^8.1", - "laravel/framework": "^10.0" + "laravel/framework": "^10.0|^11.0" }, "require-dev": { "mockery/mockery": "^1.5.1", From 0b94911e2c4c5f2729b536ea9d909d1f33c7be50 Mon Sep 17 00:00:00 2001 From: Alexandre D'Eschambeault Date: Tue, 26 Mar 2024 10:01:33 -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 f5c2ae4..7005330 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.* name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.dependency-version }} From a04dd99897a22eeff7ba206b2c1e3c029082de53 Mon Sep 17 00:00:00 2001 From: Alexandre D'Eschambeault Date: Tue, 26 Mar 2024 10:16:24 -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 668b88a..a78ae92 100644 --- a/composer.json +++ b/composer.json @@ -14,7 +14,7 @@ }, "require-dev": { "mockery/mockery": "^1.5.1", - "phpunit/phpunit": "^9.5.10", + "phpunit/phpunit": "^10.5", "squizlabs/php_codesniffer": "^3.6" }, "autoload": { From 3de122630f2d6739e5ecbbd01178fb2df118c3e1 Mon Sep 17 00:00:00 2001 From: Alexandre D'Eschambeault Date: Tue, 26 Mar 2024 10:38:00 -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 7c4969f4762d5366a39d15a4e82f32a585c637b2 Mon Sep 17 00:00:00 2001 From: Alexandre D'Eschambeault Date: Tue, 26 Mar 2024 10:57:47 -0400 Subject: [PATCH 5/5] test: abstract classes with the Test suffix are deprecated --- tests/{UnitTest.php => TestCase.php} | 4 ++-- tests/Unit/FilesystemRepositoryTest.php | 4 ++-- tests/Unit/ImageServiceTest.php | 4 ++-- tests/Unit/ImageTest.php | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) rename tests/{UnitTest.php => TestCase.php} (64%) diff --git a/tests/UnitTest.php b/tests/TestCase.php similarity index 64% rename from tests/UnitTest.php rename to tests/TestCase.php index d7dc178..dafdaf4 100644 --- a/tests/UnitTest.php +++ b/tests/TestCase.php @@ -3,9 +3,9 @@ namespace Exolnet\Image\Tests; use Mockery; -use PHPUnit\Framework\TestCase; +use PHPUnit\Framework\TestCase as BaseTestCase; -abstract class UnitTest extends TestCase +abstract class TestCase extends BaseTestCase { /** * @return void diff --git a/tests/Unit/FilesystemRepositoryTest.php b/tests/Unit/FilesystemRepositoryTest.php index 7741bbb..d10b89d 100644 --- a/tests/Unit/FilesystemRepositoryTest.php +++ b/tests/Unit/FilesystemRepositoryTest.php @@ -4,12 +4,12 @@ use Exolnet\Image\Image; use Exolnet\Image\Repository\FilesystemRepository; -use Exolnet\Image\Tests\UnitTest; +use Exolnet\Image\Tests\TestCase; use Illuminate\Filesystem\Filesystem; use Mockery as m; use Symfony\Component\HttpFoundation\File\File; -class FilesystemRepositoryTest extends UnitTest +class FilesystemRepositoryTest extends TestCase { protected $filesystemRepository; diff --git a/tests/Unit/ImageServiceTest.php b/tests/Unit/ImageServiceTest.php index 195b5db..8d0ae47 100644 --- a/tests/Unit/ImageServiceTest.php +++ b/tests/Unit/ImageServiceTest.php @@ -5,11 +5,11 @@ use Exolnet\Image\Image; use Exolnet\Image\ImageService; use Exolnet\Image\Repository\FilesystemRepository; -use Exolnet\Image\Tests\UnitTest; +use Exolnet\Image\Tests\TestCase; use Mockery as m; use Symfony\Component\HttpFoundation\File\File; -class ImageServiceTest extends UnitTest +class ImageServiceTest extends TestCase { /** @var \Exolnet\Image\ImageService */ protected $service; diff --git a/tests/Unit/ImageTest.php b/tests/Unit/ImageTest.php index c1fb65a..5f0e879 100644 --- a/tests/Unit/ImageTest.php +++ b/tests/Unit/ImageTest.php @@ -3,9 +3,9 @@ namespace Exolnet\Image\Tests\Unit; use Exolnet\Image\Image; -use Exolnet\Image\Tests\UnitTest; +use Exolnet\Image\Tests\TestCase; -class ImageTest extends UnitTest +class ImageTest extends TestCase { /** * @var \Exolnet\Image\Image