diff --git a/.github/workflows/code_analysis.yaml b/.github/workflows/code_analysis.yaml index 7926b339f..22f156298 100644 --- a/.github/workflows/code_analysis.yaml +++ b/.github/workflows/code_analysis.yaml @@ -52,7 +52,7 @@ jobs: # see https://github.com/shivammathur/setup-php - uses: shivammathur/setup-php@v2 with: - php-version: 8.3 + php-version: 8.4 coverage: none # composer install cache - https://github.com/ramsey/composer-install diff --git a/.github/workflows/downgraded_release.yaml b/.github/workflows/downgraded_release.yaml index bb502355a..f783c4e93 100644 --- a/.github/workflows/downgraded_release.yaml +++ b/.github/workflows/downgraded_release.yaml @@ -19,7 +19,7 @@ jobs: - uses: "shivammathur/setup-php@v2" with: - php-version: 8.3 + php-version: 8.4 coverage: none # invoke patches diff --git a/composer.json b/composer.json index 413714e0d..6c071235f 100644 --- a/composer.json +++ b/composer.json @@ -6,7 +6,7 @@ "bin/swiss-knife" ], "require": { - "php": ">=8.3", + "php": ">=8.4", "entropy/entropy": "^0.4.0", "nette/robot-loader": "^4.1", "nette/utils": "^4.1", @@ -25,8 +25,8 @@ "symfony/config": "^6.4", "symfony/dependency-injection": "^6.4", "symplify/easy-coding-standard": "^13.1", - "symplify/phpstan-extensions": "^12.0", - "tomasvotruba/class-leak": "^2.1|^3.0", + "symplify/phpstan-rules": "^14.11", + "tomasvotruba/class-leak": "^2.1", "tomasvotruba/unused-public": "^2.2", "tracy/tracy": "^2.12" }, diff --git a/phpstan.neon b/phpstan.neon index 15e9303ad..8d4af5e8e 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -8,6 +8,12 @@ parameters: treatPhpDocTypesAsCertain: false errorFormat: symplify + # see https://github.com/symplify/phpstan-rules + symfonyReturnType: true + laravelReturnType: true + pathStrings: true + ctor: true + excludePaths: - */Fixture/* - */Source/* diff --git a/src/Command/FinalizeClassesCommand.php b/src/Command/FinalizeClassesCommand.php index 745241b19..2b708adea 100644 --- a/src/Command/FinalizeClassesCommand.php +++ b/src/Command/FinalizeClassesCommand.php @@ -64,7 +64,7 @@ public function run( } $progressClosure = function () use ($noProgress, $progressBar): void { - if ($noProgress || !$progressBar instanceof ProgressBar) { + if ($noProgress || ! $progressBar instanceof ProgressBar) { return; }