From f7da01416b969b9fd26006338c77e4939a71a6c8 Mon Sep 17 00:00:00 2001 From: othillo Date: Fri, 7 Aug 2026 21:02:35 +0200 Subject: [PATCH 1/4] ci: run on ubuntu-latest, update actions and PHP matrix --- .github/workflows/ci.yml | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 73b1639..aab03ad 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -13,17 +13,16 @@ on: jobs: tests: name: "Run tests" - runs-on: "ubuntu-20.04" + runs-on: "ubuntu-latest" strategy: matrix: php-version: - - "7.4" - - "8.0" - - "8.1" - - "8.2" + - "8.3" + - "8.4" + - "8.5" steps: - name: "Checkout" - uses: "actions/checkout@v3" + uses: "actions/checkout@v7" - name: "Install PHP" uses: "shivammathur/setup-php@v2" with: @@ -34,7 +33,7 @@ jobs: - name: "Validate composer.json and composer.lock" run: "composer validate --strict --no-interaction --ansi" - name: "Install dependencies with Composer" - uses: "ramsey/composer-install@v2" + uses: "ramsey/composer-install@v4" - name: "Run tests" run: "make test" @@ -44,16 +43,16 @@ jobs: static-analysis: name: "Static analysis" - runs-on: "ubuntu-20.04" + runs-on: "ubuntu-latest" steps: - name: "Checkout" - uses: "actions/checkout@v3" + uses: "actions/checkout@v7" - name: "Install PHP" uses: "shivammathur/setup-php@v2" with: - php-version: "8.0" + php-version: "8.4" coverage: "none" - name: "Install dependencies with Composer" - uses: "ramsey/composer-install@v2" + uses: "ramsey/composer-install@v4" - name: "Run PHPStan" run: "make phpstan" From e99b31d7b2bafa5db9f40abe62acc34e95280c0e Mon Sep 17 00:00:00 2001 From: othillo Date: Fri, 7 Aug 2026 21:17:29 +0200 Subject: [PATCH 2/4] ci: upgrade PHPStan to 2.x --- composer.json | 2 +- phpstan-baseline.neon | 22 ++++++++++++++++++++-- 2 files changed, 21 insertions(+), 3 deletions(-) diff --git a/composer.json b/composer.json index 8fa9959..d25eb2c 100644 --- a/composer.json +++ b/composer.json @@ -10,7 +10,7 @@ "require-dev": { "phpunit/phpunit": "^8.0 || ^9.0", "broadway/coding-standard": "^1.2", - "phpstan/phpstan": "^1.0", + "phpstan/phpstan": "^2.0", "phpspec/prophecy": "^1.15" }, "authors": [ diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index d375968..96ef884 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -1,7 +1,25 @@ parameters: ignoreErrors: - - message: "#^Parameter \\#1 \\$event of method Broadway\\\\BroadwaySensitiveData\\\\EventHandling\\\\SensitiveDataProcessor\\:\\:getApplyMethod\\(\\) expects object, mixed given\\.$#" + message: '#^Method Broadway\\BroadwaySensitiveData\\EventHandling\\SensitiveData\:\:__construct\(\) has parameter \$data with no type specified\.$#' + identifier: missingType.parameter count: 1 - path: src/SensitiveDataProcessor.php + path: src/SensitiveData.php + + - + message: '#^Method Broadway\\BroadwaySensitiveData\\EventHandling\\SensitiveData\:\:getData\(\) has no return type specified\.$#' + identifier: missingType.return + count: 1 + path: src/SensitiveData.php + + - + message: '#^Property Broadway\\BroadwaySensitiveData\\EventHandling\\SensitiveData\:\:\$data has no type specified\.$#' + identifier: missingType.property + count: 1 + path: src/SensitiveData.php + - + message: '#^Parameter \#1 \$event of method Broadway\\BroadwaySensitiveData\\EventHandling\\SensitiveDataProcessor\:\:getApplyMethod\(\) expects object, mixed given\.$#' + identifier: argument.type + count: 1 + path: src/SensitiveDataProcessor.php From 0ca51d7c0032c64c6ae5d71cf09a638ea5a45c1c Mon Sep 17 00:00:00 2001 From: othillo Date: Fri, 7 Aug 2026 21:24:53 +0200 Subject: [PATCH 3/4] style: apply coding standards --- examples/HandlingSensitiveData.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/HandlingSensitiveData.php b/examples/HandlingSensitiveData.php index 6db5be6..3107718 100644 --- a/examples/HandlingSensitiveData.php +++ b/examples/HandlingSensitiveData.php @@ -118,7 +118,7 @@ class InvitationCommandHandler extends Broadway\CommandHandling\SimpleCommandHan public function __construct( Broadway\EventSourcing\EventSourcingRepository $repository, - Broadway\BroadwaySensitiveData\EventHandling\SensitiveDataManager $sensitiveDataManager + Broadway\BroadwaySensitiveData\EventHandling\SensitiveDataManager $sensitiveDataManager, ) { $this->repository = $repository; $this->sensitiveDataManager = $sensitiveDataManager; From 92df71ba16b95d14a965323168eb96edb3dacc07 Mon Sep 17 00:00:00 2001 From: othillo Date: Fri, 7 Aug 2026 21:26:40 +0200 Subject: [PATCH 4/4] build!: require PHP 8.2 or higher BREAKING CHANGE: PHP 7 and PHP 8.0/8.1 are end of life and no longer supported. --- .github/workflows/ci.yml | 4 +++- composer.json | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index aab03ad..53ebd33 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -17,6 +17,8 @@ jobs: strategy: matrix: php-version: + - "8.2" + - "8.2" - "8.3" - "8.4" - "8.5" @@ -50,7 +52,7 @@ jobs: - name: "Install PHP" uses: "shivammathur/setup-php@v2" with: - php-version: "8.4" + php-version: "8.5" coverage: "none" - name: "Install dependencies with Composer" uses: "ramsey/composer-install@v4" diff --git a/composer.json b/composer.json index d25eb2c..a048b54 100644 --- a/composer.json +++ b/composer.json @@ -5,7 +5,7 @@ "license": "MIT", "require": { "broadway/broadway": "^2.3.1", - "php": ">=7.2" + "php": "^8.2" }, "require-dev": { "phpunit/phpunit": "^8.0 || ^9.0",