From 1df645849dc12f7600fec336e9fbe4393eced5f3 Mon Sep 17 00:00:00 2001 From: Stefan Zweifel Date: Sat, 3 Feb 2024 17:13:05 +0100 Subject: [PATCH 01/10] Support Laravel 11 --- composer.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/composer.json b/composer.json index 98d0153..24f2484 100644 --- a/composer.json +++ b/composer.json @@ -18,13 +18,13 @@ "require": { "php": "^8.0", "spatie/laravel-package-tools": "^1.4.3", - "illuminate/contracts": "^8.35|^9.0|^10.0" + "illuminate/contracts": "^8.35|^9.0|^10.0|^11.0" }, "require-dev": { "ext-pcntl": "*", "brianium/paratest": "^6.2", - "nunomaduro/collision": "^5.3|^6.0", - "orchestra/testbench": "^6.16|^7.0|^8.0", + "nunomaduro/collision": "^5.3|^6.0|^7.0|^8.0", + "orchestra/testbench": "^6.16|^7.0|^8.0|^9.0", "pestphp/pest-plugin-laravel": "^1.3", "phpunit/phpunit": "^9.5", "spatie/laravel-ray": "^1.17" From d7ccdad841724178ec93adfd16a3041dfa2345f5 Mon Sep 17 00:00:00 2001 From: Stefan Zweifel Date: Sat, 3 Feb 2024 17:13:25 +0100 Subject: [PATCH 02/10] Run tests for Laravel 11 --- .github/workflows/run-tests.yml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index edda121..5d6758e 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -10,9 +10,11 @@ jobs: matrix: os: [ubuntu-latest] php: [8.2, 8.1, 8.0] - laravel: [10.*, 9.*, 8.*] + laravel: [11.*,10.*, 9.*, 8.*] stability: [prefer-stable] include: + - laravel: 11.* + testbench: 9.* - laravel: 10.* testbench: 8.* - laravel: 9.* @@ -20,8 +22,12 @@ jobs: - laravel: 8.* testbench: 6.* exclude: + - laravel: 11.* + php: 8.0 + - laravel: 11.* + php: 8.1 - laravel: 10.* - php: 8.0 + php: 8.0 name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.stability }} - ${{ matrix.os }} From 24e043d1eee8c8233ee27d00d248ccdfb511f0c5 Mon Sep 17 00:00:00 2001 From: Stefan Zweifel Date: Sat, 3 Feb 2024 17:15:15 +0100 Subject: [PATCH 03/10] Support modern PHPUnit versions --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 24f2484..2c56487 100644 --- a/composer.json +++ b/composer.json @@ -26,7 +26,7 @@ "nunomaduro/collision": "^5.3|^6.0|^7.0|^8.0", "orchestra/testbench": "^6.16|^7.0|^8.0|^9.0", "pestphp/pest-plugin-laravel": "^1.3", - "phpunit/phpunit": "^9.5", + "phpunit/phpunit": "^9.5|^10|^11", "spatie/laravel-ray": "^1.17" }, "autoload": { From 36d8ea724822161126b1abebc7892ed4a11d88b9 Mon Sep 17 00:00:00 2001 From: Stefan Zweifel Date: Sat, 3 Feb 2024 17:30:45 +0100 Subject: [PATCH 04/10] Update pest-plugin-laravel --- composer.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/composer.json b/composer.json index 2c56487..f3db129 100644 --- a/composer.json +++ b/composer.json @@ -22,10 +22,10 @@ }, "require-dev": { "ext-pcntl": "*", - "brianium/paratest": "^6.2", + "brianium/paratest": "^6.2|^7.0", "nunomaduro/collision": "^5.3|^6.0|^7.0|^8.0", "orchestra/testbench": "^6.16|^7.0|^8.0|^9.0", - "pestphp/pest-plugin-laravel": "^1.3", + "pestphp/pest-plugin-laravel": "^1.3|^2.0", "phpunit/phpunit": "^9.5|^10|^11", "spatie/laravel-ray": "^1.17" }, From a8cb9a193be81976ad70733961528337bc264ede Mon Sep 17 00:00:00 2001 From: Stefan Zweifel Date: Sat, 3 Feb 2024 17:37:44 +0100 Subject: [PATCH 05/10] Update handleSignal signature --- src/SignalAwareCommand.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/SignalAwareCommand.php b/src/SignalAwareCommand.php index 9d6a15c..b239147 100644 --- a/src/SignalAwareCommand.php +++ b/src/SignalAwareCommand.php @@ -14,13 +14,15 @@ public function getSubscribedSignals(): array return array_merge($this->autoDiscoverSignals(), $this->handlesSignals ?? []); } - public function handleSignal(int $signal): void + public function handleSignal(int $signal, int|false $previousExitCode = 0): int|false { event(new SignalReceived($signal, $this)); $this ->executeRegisteredSignalHandlers($signal) ->handleSignalMethodOnCommandClass($signal); + + return $signal; } protected function executeRegisteredSignalHandlers(int $signal): self From 99795d0cac10ecaef1cd591eceabfd99da57fbce Mon Sep 17 00:00:00 2001 From: Stefan Zweifel Date: Sat, 3 Feb 2024 17:37:48 +0100 Subject: [PATCH 06/10] Update Test --- tests/SignalTest.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/SignalTest.php b/tests/SignalTest.php index a41b68d..ea8ff06 100644 --- a/tests/SignalTest.php +++ b/tests/SignalTest.php @@ -26,9 +26,11 @@ /** @var \Spatie\SignalAwareCommand\SignalAwareCommand $command */ $command = app()->make(TestCommand::class); - $command->handleSignal(SIGINT); + $result = $command->handleSignal(SIGINT); Event::assertDispatched(SignalReceived::class); + + expect($result)->toEqual(SIGINT); }); it('can clear registered handlers', function () { From 3a4d0ac3a09a96afe4738edb58f489fe6544fef9 Mon Sep 17 00:00:00 2001 From: Stefan Zweifel Date: Sat, 3 Feb 2024 17:41:13 +0100 Subject: [PATCH 07/10] Drop Support for Laravel 8 --- .github/workflows/run-tests.yml | 4 +--- composer.json | 5 +++-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index 5d6758e..972fc38 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -10,7 +10,7 @@ jobs: matrix: os: [ubuntu-latest] php: [8.2, 8.1, 8.0] - laravel: [11.*,10.*, 9.*, 8.*] + laravel: [11.*,10.*, 9.*] stability: [prefer-stable] include: - laravel: 11.* @@ -19,8 +19,6 @@ jobs: testbench: 8.* - laravel: 9.* testbench: 7.* - - laravel: 8.* - testbench: 6.* exclude: - laravel: 11.* php: 8.0 diff --git a/composer.json b/composer.json index f3db129..7edb3f2 100644 --- a/composer.json +++ b/composer.json @@ -18,13 +18,14 @@ "require": { "php": "^8.0", "spatie/laravel-package-tools": "^1.4.3", - "illuminate/contracts": "^8.35|^9.0|^10.0|^11.0" + "illuminate/contracts": "^9.0|^10.0|^11.0", + "symfony/console": "^7.0" }, "require-dev": { "ext-pcntl": "*", "brianium/paratest": "^6.2|^7.0", "nunomaduro/collision": "^5.3|^6.0|^7.0|^8.0", - "orchestra/testbench": "^6.16|^7.0|^8.0|^9.0", + "orchestra/testbench": "^7.0|^8.0|^9.0", "pestphp/pest-plugin-laravel": "^1.3|^2.0", "phpunit/phpunit": "^9.5|^10|^11", "spatie/laravel-ray": "^1.17" From 5684b78fc5f7b24d1ba34b595be5d290923cce07 Mon Sep 17 00:00:00 2001 From: Stefan Zweifel Date: Sat, 3 Feb 2024 17:42:38 +0100 Subject: [PATCH 08/10] Drop Support for Laravel 9 and 10 as well --- .github/workflows/run-tests.yml | 15 ++------------- composer.json | 4 ++-- 2 files changed, 4 insertions(+), 15 deletions(-) diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index 972fc38..cbb07d4 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -9,23 +9,12 @@ jobs: fail-fast: false matrix: os: [ubuntu-latest] - php: [8.2, 8.1, 8.0] - laravel: [11.*,10.*, 9.*] + php: [8.3,8.2] + laravel: [11.*] stability: [prefer-stable] include: - laravel: 11.* testbench: 9.* - - laravel: 10.* - testbench: 8.* - - laravel: 9.* - testbench: 7.* - exclude: - - laravel: 11.* - php: 8.0 - - laravel: 11.* - php: 8.1 - - laravel: 10.* - php: 8.0 name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.stability }} - ${{ matrix.os }} diff --git a/composer.json b/composer.json index 7edb3f2..9c62407 100644 --- a/composer.json +++ b/composer.json @@ -18,14 +18,14 @@ "require": { "php": "^8.0", "spatie/laravel-package-tools": "^1.4.3", - "illuminate/contracts": "^9.0|^10.0|^11.0", + "illuminate/contracts": "^11.0", "symfony/console": "^7.0" }, "require-dev": { "ext-pcntl": "*", "brianium/paratest": "^6.2|^7.0", "nunomaduro/collision": "^5.3|^6.0|^7.0|^8.0", - "orchestra/testbench": "^7.0|^8.0|^9.0", + "orchestra/testbench": "^9.0", "pestphp/pest-plugin-laravel": "^1.3|^2.0", "phpunit/phpunit": "^9.5|^10|^11", "spatie/laravel-ray": "^1.17" From 975c7d13cbf33e0511c27f7d76ac672f6f815167 Mon Sep 17 00:00:00 2001 From: Stefan Zweifel Date: Sat, 3 Feb 2024 17:45:15 +0100 Subject: [PATCH 09/10] Require PHP 8.2 --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 9c62407..74a3cd0 100644 --- a/composer.json +++ b/composer.json @@ -16,7 +16,7 @@ } ], "require": { - "php": "^8.0", + "php": "^8.2", "spatie/laravel-package-tools": "^1.4.3", "illuminate/contracts": "^11.0", "symfony/console": "^7.0" From 207f9430203ea21e3f0bd339989162afcdc6cdbb Mon Sep 17 00:00:00 2001 From: Stefan Zweifel Date: Sat, 3 Feb 2024 17:50:08 +0100 Subject: [PATCH 10/10] Update run-tests.yml --- .github/workflows/run-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index cbb07d4..7f6cd4d 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -9,7 +9,7 @@ jobs: fail-fast: false matrix: os: [ubuntu-latest] - php: [8.3,8.2] + php: [8.3, 8.2] laravel: [11.*] stability: [prefer-stable] include: