From 657f476fa70776c33428eb87ec9db95bdf4ab117 Mon Sep 17 00:00:00 2001 From: Alies Lapatsin Date: Wed, 28 Feb 2024 00:21:57 +0530 Subject: [PATCH 1/5] Support Laravel 11, update dependencies --- .github/workflows/test.yml | 13 ++++--------- composer.json | 10 +++++----- phpunit.xml.dist | 28 ++++++++++++++-------------- 3 files changed, 23 insertions(+), 28 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 3e3958f..c77eca3 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -10,22 +10,17 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - php: [8.3, 8.2, 8.1, 8.0, 7.4] - laravel: [10.*, 9.*] + php: [8.3, 8.2, 8.1] + laravel: [11.*, 10.*] dependency-version: [prefer-lowest] os: [ubuntu-latest] include: + - laravel: 11.* + testbench: 9.* - laravel: 10.* testbench: 8.* - laravel: 9.* testbench: 7.* - exclude: - - php: 8.0 - laravel: 10.* - - php: 7.4 - laravel: 10.* - - php: 7.4 - laravel: 9.* name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.os }} diff --git a/composer.json b/composer.json index 2e854c0..bb1bf2d 100644 --- a/composer.json +++ b/composer.json @@ -9,14 +9,14 @@ "translation" ], "require": { - "php": "^7.4 || ^8.0", - "illuminate/console": "^9.0 || ^10.0 || ^11.0", - "illuminate/support": "^9.0 || ^10.0 || ^11.0" + "php": "^8.1", + "illuminate/console": "^10.0 || ^11.0", + "illuminate/support": "^10.0 || ^11.0" }, "require-dev": { "friendsofphp/php-cs-fixer": "^3.50", - "orchestra/testbench": "^7.0 || ^8.0 || ^9.0", - "phpunit/phpunit": "^9.6 || ^10.5 || ^11.0", + "orchestra/testbench": "^8.0 || ^9.0", + "phpunit/phpunit": "^10.5 || ^11.0", "vimeo/psalm": "^5.22" }, "minimum-stability": "dev", diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 59584f1..f2e9f44 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -1,22 +1,22 @@ - + tests - - + + src/ - - + + From be8a591921a7fdc2b162f1138cb2f3b032c8d6db Mon Sep 17 00:00:00 2001 From: Alies Lapatsin Date: Wed, 28 Feb 2024 00:24:03 +0530 Subject: [PATCH 2/5] Ignore .phpunit.cache dir --- .gitignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitignore b/.gitignore index a7a2b04..1a013f9 100644 --- a/.gitignore +++ b/.gitignore @@ -2,4 +2,6 @@ composer.lock vendor .phpunit.result.cache +.phpunit.cache + .php-cs-fixer.cache From dd5f2ed34ab64815407a82a3621b941d5923019b Mon Sep 17 00:00:00 2001 From: Alies Lapatsin Date: Wed, 28 Feb 2024 00:25:43 +0530 Subject: [PATCH 3/5] Cleanup matrix --- .github/workflows/test.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index c77eca3..b4469d5 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -19,8 +19,6 @@ jobs: testbench: 9.* - laravel: 10.* testbench: 8.* - - laravel: 9.* - testbench: 7.* name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.os }} From 849f2e65f2e642386f565b0210341161a2344cd0 Mon Sep 17 00:00:00 2001 From: Alies Lapatsin Date: Wed, 28 Feb 2024 00:26:31 +0530 Subject: [PATCH 4/5] Exclude PHP8.1 and L11 --- .github/workflows/test.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index b4469d5..94642f2 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -19,6 +19,9 @@ jobs: testbench: 9.* - laravel: 10.* testbench: 8.* + exclude: + - php: 8.1 + laravel: 11.* name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.os }} From d3250f18f3164336e4a5fceb6c885f2d072d820d Mon Sep 17 00:00:00 2001 From: Alies Lapatsin Date: Wed, 28 Feb 2024 00:28:19 +0530 Subject: [PATCH 5/5] Use attributes in PHPUnit tests --- tests/Commands/FindMissingTranslationsTest.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/tests/Commands/FindMissingTranslationsTest.php b/tests/Commands/FindMissingTranslationsTest.php index f9ef3ff..02c5110 100644 --- a/tests/Commands/FindMissingTranslationsTest.php +++ b/tests/Commands/FindMissingTranslationsTest.php @@ -6,11 +6,12 @@ use Diglabby\FindMissingTranslations\Tests\TestCase; use Illuminate\Support\Facades\Artisan; +use PHPUnit\Framework\Attributes\Test; final class FindMissingTranslationsTest extends TestCase { - /** @test */ - public function it_does_not_report_about_synchronized_files() + #[Test] + public function it_does_not_report_about_synchronized_files(): void { $this->withoutMockingConsoleOutput(); @@ -22,8 +23,8 @@ public function it_does_not_report_about_synchronized_files() $this->assertSame('Successfully compared all languages.', trim($output)); } - /** @test */ - public function it_reports_about_missing_translation_keys() + #[Test] + public function it_reports_about_missing_translation_keys(): void { $this->withoutMockingConsoleOutput();