8.x #58
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: | |
| paths: | |
| - 'src/**' | |
| - 'tests/**' | |
| - '.github/workflows/static-analysis.yml' | |
| - 'composer.json' | |
| - 'phpstan.neon.dist' | |
| push: | |
| branches: ['8.x'] | |
| paths: | |
| - 'src/**' | |
| - 'tests/**' | |
| - '.github/workflows/static-analysis.yml' | |
| - 'composer.json' | |
| - 'phpstan.neon.dist' | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| jobs: | |
| phpstan: | |
| name: "PHPStan (PHP ${{ matrix.php }})" | |
| runs-on: ubuntu-latest | |
| if: github.actor != 'dependabot[bot]' | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| php: | |
| - "8.3" | |
| - "8.4" | |
| - "8.5" | |
| env: | |
| extensions: ctype, dom, grpc, json, mbstring, openssl, xml, zip, zlib | |
| key: cache-static-analysis-8x-${{ matrix.php }} | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v6 | |
| - name: Setup cache environment | |
| id: extcache | |
| uses: shivammathur/cache-extensions@v1 | |
| with: | |
| php-version: ${{ matrix.php }} | |
| extensions: ${{ env.extensions }} | |
| key: ${{ env.key }} | |
| - name: Cache extensions | |
| uses: actions/[email protected] | |
| with: | |
| path: ${{ steps.extcache.outputs.dir }} | |
| key: ${{ steps.extcache.outputs.key }} | |
| restore-keys: ${{ steps.extcache.outputs.key }} | |
| - name: Setup PHP | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: ${{ matrix.php }} | |
| extensions: ${{ env.extensions }} | |
| tools: composer, pecl | |
| coverage: none | |
| - uses: "ramsey/composer-install@v3" | |
| with: | |
| composer-options: "${{ matrix.composer-options }}" | |
| - name: Setup problem matchers for PHP | |
| run: echo "::add-matcher::${{ runner.tool_cache }}/php.json" | |
| - name: Run PHPStan | |
| run: XDEBUG_MODE=off vendor/bin/phpstan analyse --no-progress --error-format=github |