From 93154c0704e11d48dc4039628995c0a20039e9b4 Mon Sep 17 00:00:00 2001 From: Stefan Zweifel Date: Sat, 3 Feb 2024 17:02:10 +0100 Subject: [PATCH 1/8] Add Support for Laravel 11 --- composer.json | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/composer.json b/composer.json index a388ccff..7371efad 100644 --- a/composer.json +++ b/composer.json @@ -20,12 +20,12 @@ "require": { "php": "^8.1", "ext-zip": "^1.14.0", - "illuminate/console": "^10.10.0", - "illuminate/contracts": "^10.10.0", - "illuminate/events": "^10.10.0", - "illuminate/filesystem": "^10.10.0", - "illuminate/notifications": "^10.10.0", - "illuminate/support": "^10.10.0", + "illuminate/console": "^10.10.0|^11.0", + "illuminate/contracts": "^10.10.0|^11.0", + "illuminate/events": "^10.10.0|^11.0", + "illuminate/filesystem": "^10.10.0|^11.0", + "illuminate/notifications": "^10.10.0|^11.0", + "illuminate/support": "^10.10.0|^11.0", "league/flysystem": "^3.0", "spatie/db-dumper": "^3.0", "spatie/laravel-package-tools": "^1.6.2", @@ -41,7 +41,7 @@ "laravel/slack-notification-channel": "^2.5", "league/flysystem-aws-s3-v3": "^2.0|^3.0", "mockery/mockery": "^1.4", - "orchestra/testbench": "^8.0", + "orchestra/testbench": "^8.0|^9.0", "pestphp/pest": "^1.20", "phpstan/extension-installer": "^1.1", "phpstan/phpstan-deprecation-rules": "^1.0", From bd0668a973200aa9a7c9d1c6222f0aa3f5821647 Mon Sep 17 00:00:00 2001 From: Stefan Zweifel Date: Sat, 3 Feb 2024 17:02:19 +0100 Subject: [PATCH 2/8] Update Tests to run Laravel 11 --- .github/workflows/run-tests.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index 9d550fd4..9c77decc 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -10,11 +10,13 @@ jobs: matrix: os: [ubuntu-latest] php: [8.3, 8.2, 8.1] - 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 }} From 65145789ee11f6139f7845edbf0dad95848e0b5b Mon Sep 17 00:00:00 2001 From: Stefan Zweifel Date: Sat, 3 Feb 2024 17:05:37 +0100 Subject: [PATCH 3/8] Support symfony v7 components --- composer.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/composer.json b/composer.json index 7371efad..3f85485c 100644 --- a/composer.json +++ b/composer.json @@ -31,8 +31,8 @@ "spatie/laravel-package-tools": "^1.6.2", "spatie/laravel-signal-aware-command": "^1.2", "spatie/temporary-directory": "^2.0", - "symfony/console": "^6.0", - "symfony/finder": "^6.0" + "symfony/console": "^6.0|^7.0", + "symfony/finder": "^6.0|^7.0" }, "require-dev": { "ext-pcntl": "*", From aae6ba3a3bd332a4575cb2fb70964c7e3de76510 Mon Sep 17 00:00:00 2001 From: Stefan Zweifel Date: Sat, 3 Feb 2024 17:08:25 +0100 Subject: [PATCH 4/8] Support laravel/slack-notification-channel v3 --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 3f85485c..81902aab 100644 --- a/composer.json +++ b/composer.json @@ -38,7 +38,7 @@ "ext-pcntl": "*", "composer-runtime-api": "^2.0", "larastan/larastan": "^2.7.0", - "laravel/slack-notification-channel": "^2.5", + "laravel/slack-notification-channel": "^2.5|^3.0", "league/flysystem-aws-s3-v3": "^2.0|^3.0", "mockery/mockery": "^1.4", "orchestra/testbench": "^8.0|^9.0", From f41bc95e51b62b7ceb4219521305d45bb63d092d Mon Sep 17 00:00:00 2001 From: Stefan Zweifel Date: Mon, 5 Feb 2024 15:24:09 +0100 Subject: [PATCH 5/8] Use signal-aware-command v2 --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 81902aab..70fdd8ca 100644 --- a/composer.json +++ b/composer.json @@ -29,7 +29,7 @@ "league/flysystem": "^3.0", "spatie/db-dumper": "^3.0", "spatie/laravel-package-tools": "^1.6.2", - "spatie/laravel-signal-aware-command": "^1.2", + "spatie/laravel-signal-aware-command": "^1.2|^2.0", "spatie/temporary-directory": "^2.0", "symfony/console": "^6.0|^7.0", "symfony/finder": "^6.0|^7.0" From 494e8be93b90c7b4f4e1f597306270f227c8f035 Mon Sep 17 00:00:00 2001 From: Stefan Zweifel Date: Mon, 5 Feb 2024 15:25:36 +0100 Subject: [PATCH 6/8] Use Pest v2 --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 70fdd8ca..173939cf 100644 --- a/composer.json +++ b/composer.json @@ -42,7 +42,7 @@ "league/flysystem-aws-s3-v3": "^2.0|^3.0", "mockery/mockery": "^1.4", "orchestra/testbench": "^8.0|^9.0", - "pestphp/pest": "^1.20", + "pestphp/pest": "^1.20|^2.0", "phpstan/extension-installer": "^1.1", "phpstan/phpstan-deprecation-rules": "^1.0", "phpstan/phpstan-phpunit": "^1.1" From 4cc9eb357d985f0947033df13682b9ca237a7030 Mon Sep 17 00:00:00 2001 From: Stefan Zweifel Date: Mon, 5 Feb 2024 15:28:35 +0100 Subject: [PATCH 7/8] Don't test Laravel 11 on PHP 8.1 --- .github/workflows/run-tests.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index 9c77decc..7bc97740 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -17,6 +17,9 @@ jobs: testbench: 8.* - laravel: 11.* testbench: 9.* + exclude: + - laravel: 11.* + php: 8.1 name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.dependency-version }} From 17c2006ae37bde3a9c2a5b8083f09e9bc127a8f0 Mon Sep 17 00:00:00 2001 From: Stefan Zweifel Date: Mon, 5 Feb 2024 15:41:02 +0100 Subject: [PATCH 8/8] Update Assertion --- tests/FormatTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/FormatTest.php b/tests/FormatTest.php index c92cb2a1..dd4bb4e0 100644 --- a/tests/FormatTest.php +++ b/tests/FormatTest.php @@ -17,7 +17,7 @@ it('can determine the age in days', function () { Carbon::setTestNow(Carbon::create(2016, 1, 1)->startOfDay()); - expect(Format::ageInDays(Carbon::now()))->toEqual('0.00 (1 second ago)'); + expect(Format::ageInDays(Carbon::now()->subSeconds(5)))->toEqual('0.00 (5 seconds ago)'); expect(Format::ageInDays(Carbon::now()->subHour(1)))->toEqual('0.04 (1 hour ago)'); expect(Format::ageInDays(Carbon::now()->subHour(1)->subDay(1)))->toEqual('1.04 (1 day ago)'); expect(Format::ageInDays(Carbon::now()->subHour(1)->subMonths(1)))->toEqual('30.04 (4 weeks ago)');