diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 73b1639..53ebd33 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -13,17 +13,18 @@ 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.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 +35,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 +45,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.5" coverage: "none" - name: "Install dependencies with Composer" - uses: "ramsey/composer-install@v2" + uses: "ramsey/composer-install@v4" - name: "Run PHPStan" run: "make phpstan" diff --git a/composer.json b/composer.json index 8fa9959..a048b54 100644 --- a/composer.json +++ b/composer.json @@ -5,12 +5,12 @@ "license": "MIT", "require": { "broadway/broadway": "^2.3.1", - "php": ">=7.2" + "php": "^8.2" }, "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/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; 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