From 5afff0cce32082ee67159bebabb171c7f16f21b4 Mon Sep 17 00:00:00 2001 From: "Cyrill N. Kalita" Date: Thu, 19 Mar 2026 14:15:09 -0500 Subject: [PATCH 1/8] Update dependencies and simplify class constructors --- composer.json | 16 ++++++++-------- src/Fireable.php | 3 +-- src/FireableAttributes.php | 4 +++- tests/stubs/StatusChangedToOpen.php | 3 +-- tests/stubs/TestModel.php | 2 +- tests/stubs/ValueChanged.php | 3 +-- 6 files changed, 15 insertions(+), 16 deletions(-) diff --git a/composer.json b/composer.json index 8f656eb..306e320 100644 --- a/composer.json +++ b/composer.json @@ -20,19 +20,19 @@ "require": { "php": "^8.2", "spatie/laravel-package-tools": "^1.16", - "illuminate/contracts": "^11.0|^12.0" + "illuminate/contracts": "^13.0" }, "require-dev": { "laravel/pint": "^1.14", "nunomaduro/collision": "^8.1.1", - "larastan/larastan": "^2.9", - "orchestra/testbench": "^9.0|^10.0", - "pestphp/pest": "^3.0", - "pestphp/pest-plugin-arch": "^3.0", - "pestphp/pest-plugin-laravel": "^2.0||^3.0", + "larastan/larastan": "^2.9|^3.0", + "orchestra/testbench": "^9.0|^10.0|^11.0", + "pestphp/pest": "^3.0|^4.0", + "pestphp/pest-plugin-arch": "^3.0|^4.0|^5.0", + "pestphp/pest-plugin-laravel": "^2.0|^3.0|^4.0|^5.0", "phpstan/extension-installer": "^1.3", - "phpstan/phpstan-deprecation-rules": "^1.1", - "phpstan/phpstan-phpunit": "^1.3" + "phpstan/phpstan-deprecation-rules": "^1.1|^2.0", + "phpstan/phpstan-phpunit": "^1.3|^2.0" }, "autoload": { "psr-4": { diff --git a/src/Fireable.php b/src/Fireable.php index bd2be1b..303c82a 100755 --- a/src/Fireable.php +++ b/src/Fireable.php @@ -10,8 +10,7 @@ class Fireable public function __construct( protected readonly Model $model, protected readonly array $fireableAttributes = [], - ) { - } + ) {} /** * Match updated attributes with fireable ones and trigger events. diff --git a/src/FireableAttributes.php b/src/FireableAttributes.php index e6ac215..eea702a 100644 --- a/src/FireableAttributes.php +++ b/src/FireableAttributes.php @@ -2,8 +2,10 @@ namespace BinaryCats\FireableAttributeEvents; +use Illuminate\Database\Eloquent\Model; + /** - * @mixin \Illuminate\Database\Eloquent\Model + * @mixin Model */ trait FireableAttributes { diff --git a/tests/stubs/StatusChangedToOpen.php b/tests/stubs/StatusChangedToOpen.php index 057b78e..5c650fc 100644 --- a/tests/stubs/StatusChangedToOpen.php +++ b/tests/stubs/StatusChangedToOpen.php @@ -6,6 +6,5 @@ class StatusChangedToOpen { public function __construct( public readonly TestModel $model, - ) { - } + ) {} } diff --git a/tests/stubs/TestModel.php b/tests/stubs/TestModel.php index 7aee2b3..1e4c279 100644 --- a/tests/stubs/TestModel.php +++ b/tests/stubs/TestModel.php @@ -13,7 +13,7 @@ class TestModel extends Model protected $guarded = []; protected array $fireableAttributes = [ - 'value' => ValueChanged::class, + 'value' => ValueChanged::class, 'status' => [ 'open' => StatusChangedToOpen::class, ], diff --git a/tests/stubs/ValueChanged.php b/tests/stubs/ValueChanged.php index 17397af..346c497 100644 --- a/tests/stubs/ValueChanged.php +++ b/tests/stubs/ValueChanged.php @@ -6,6 +6,5 @@ class ValueChanged { public function __construct( public readonly TestModel $model, - ) { - } + ) {} } From ea49f10584f0f0eddfd8e19df227f9baab9f28b5 Mon Sep 17 00:00:00 2001 From: StyleCI Bot Date: Thu, 19 Mar 2026 19:16:55 +0000 Subject: [PATCH 2/8] Apply fixes from StyleCI --- src/Fireable.php | 3 ++- tests/stubs/StatusChangedToOpen.php | 3 ++- tests/stubs/TestModel.php | 2 +- tests/stubs/ValueChanged.php | 3 ++- 4 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/Fireable.php b/src/Fireable.php index 303c82a..bd2be1b 100755 --- a/src/Fireable.php +++ b/src/Fireable.php @@ -10,7 +10,8 @@ class Fireable public function __construct( protected readonly Model $model, protected readonly array $fireableAttributes = [], - ) {} + ) { + } /** * Match updated attributes with fireable ones and trigger events. diff --git a/tests/stubs/StatusChangedToOpen.php b/tests/stubs/StatusChangedToOpen.php index 5c650fc..057b78e 100644 --- a/tests/stubs/StatusChangedToOpen.php +++ b/tests/stubs/StatusChangedToOpen.php @@ -6,5 +6,6 @@ class StatusChangedToOpen { public function __construct( public readonly TestModel $model, - ) {} + ) { + } } diff --git a/tests/stubs/TestModel.php b/tests/stubs/TestModel.php index 1e4c279..7aee2b3 100644 --- a/tests/stubs/TestModel.php +++ b/tests/stubs/TestModel.php @@ -13,7 +13,7 @@ class TestModel extends Model protected $guarded = []; protected array $fireableAttributes = [ - 'value' => ValueChanged::class, + 'value' => ValueChanged::class, 'status' => [ 'open' => StatusChangedToOpen::class, ], diff --git a/tests/stubs/ValueChanged.php b/tests/stubs/ValueChanged.php index 346c497..17397af 100644 --- a/tests/stubs/ValueChanged.php +++ b/tests/stubs/ValueChanged.php @@ -6,5 +6,6 @@ class ValueChanged { public function __construct( public readonly TestModel $model, - ) {} + ) { + } } From de88f8afaf2551fc183a1e1d9e9830e074b25ea3 Mon Sep 17 00:00:00 2001 From: "Cyrill N. Kalita" Date: Thu, 19 Mar 2026 14:17:36 -0500 Subject: [PATCH 3/8] Update stability option to prefer-stable in 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 48de9b4..bea3e1d 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -19,7 +19,7 @@ jobs: os: [ubuntu-latest, windows-latest] php: [8.4, 8.3, 8.2] laravel: [11.*] - stability: [prefer-lowest, prefer-stable] + stability: [prefer-stable] include: - laravel: 11.* testbench: 9.* From 72347fc82f58942a0abf155a38add15f25b3437c Mon Sep 17 00:00:00 2001 From: "Cyrill N. Kalita" Date: Thu, 19 Mar 2026 14:19:24 -0500 Subject: [PATCH 4/8] Update PHP and Laravel versions in test workflowmatrix --- .github/workflows/run-tests.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index bea3e1d..8c6bf26 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -17,8 +17,8 @@ jobs: fail-fast: true matrix: os: [ubuntu-latest, windows-latest] - php: [8.4, 8.3, 8.2] - laravel: [11.*] + php: [8.5, 8.4, 8.3, 8.2] + laravel: [12.*, 13.*] stability: [prefer-stable] include: - laravel: 11.* From 66bf7bb14ae744e47f0ae0bfd352f3ccdd9eff38 Mon Sep 17 00:00:00 2001 From: "Cyrill N. Kalita" Date: Thu, 19 Mar 2026 14:25:09 -0500 Subject: [PATCH 5/8] Update Laravel versions for PHP 8.4, 8.3, and 8.2 --- .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 8c6bf26..1ab66b8 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -17,13 +17,19 @@ jobs: fail-fast: true matrix: os: [ubuntu-latest, windows-latest] - php: [8.5, 8.4, 8.3, 8.2] - laravel: [12.*, 13.*] + php: [8.4, 8.3, 8.2] + laravel: [11.*, 12.*, 13.*] stability: [prefer-stable] include: - laravel: 11.* testbench: 9.* carbon: ^2.63 + - laravel: 12.* + testbench: 10.* + carbon: ^3.0 + - laravel: 13.* + testbench: 11.* + carbon: ^3.0 name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.stability }} - ${{ matrix.os }} From 2c858f0fbfc176a38570ec97bbba8c2c6bddb272 Mon Sep 17 00:00:00 2001 From: "Cyrill N. Kalita" Date: Thu, 19 Mar 2026 14:26:36 -0500 Subject: [PATCH 6/8] Update illuminate/contracts version constraint to allow ^11.*|^12.*|^13.0 --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 306e320..9eefa6c 100644 --- a/composer.json +++ b/composer.json @@ -20,7 +20,7 @@ "require": { "php": "^8.2", "spatie/laravel-package-tools": "^1.16", - "illuminate/contracts": "^13.0" + "illuminate/contracts": "^11.*|^12.*|^13.0" }, "require-dev": { "laravel/pint": "^1.14", From d519114477f3920653a26029c9778d7995f7599c Mon Sep 17 00:00:00 2001 From: "Cyrill N. Kalita" Date: Thu, 19 Mar 2026 14:28:29 -0500 Subject: [PATCH 7/8] Update illuminate/contracts version constraintsfor Laravel compatibility --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 9eefa6c..131b445 100644 --- a/composer.json +++ b/composer.json @@ -20,7 +20,7 @@ "require": { "php": "^8.2", "spatie/laravel-package-tools": "^1.16", - "illuminate/contracts": "^11.*|^12.*|^13.0" + "illuminate/contracts": "^11.0|^12.0|^13.0" }, "require-dev": { "laravel/pint": "^1.14", From cadc682dc514091565c2e61268bc0a6e71d2727a Mon Sep 17 00:00:00 2001 From: "Cyrill N. Kalita" Date: Thu, 19 Mar 2026 14:30:01 -0500 Subject: [PATCH 8/8] Exclude laravel 13.* with php 8.2 from test jobs --- .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 1ab66b8..2e02480 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -20,6 +20,9 @@ jobs: php: [8.4, 8.3, 8.2] laravel: [11.*, 12.*, 13.*] stability: [prefer-stable] + exclude: + - laravel: 13.* + php: 8.2 include: - laravel: 11.* testbench: 9.*