feat: rise phpstan level 8 and resolve errors #2278
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: "Static Analysis" | |
| on: | |
| pull_request: | |
| branches: | |
| - "*.x" | |
| paths: | |
| - .github/workflows/static-analysis.yml | |
| - config/** | |
| - composer.* | |
| - phpstan.neon.dist | |
| - src/** | |
| - tests/** | |
| push: | |
| branches: | |
| - "*.x" | |
| paths: | |
| - .github/workflows/static-analysis.yml | |
| - config/** | |
| - composer.* | |
| - phpstan.neon.dist | |
| - src/** | |
| - tests/** | |
| jobs: | |
| phpstan: | |
| name: "PHPStan" | |
| runs-on: "ubuntu-latest" | |
| steps: | |
| - name: "Checkout code" | |
| uses: "actions/checkout@v5" | |
| - name: "Install PHP" | |
| uses: "shivammathur/setup-php@v2" | |
| with: | |
| coverage: "none" | |
| php-version: "8.4" | |
| - name: "Install dependencies with Composer" | |
| uses: "ramsey/composer-install@v3" | |
| - name: "Warm up Symfony cache" | |
| run: "php tests/console-application.php" | |
| - name: "Run a static analysis with phpstan/phpstan" | |
| run: "vendor/bin/phpstan analyse -v" |