Fix PHP 8.4 deprecation: Add explicit nullable type hints (#309) #587
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: CI | |
| on: | |
| push: | |
| branches: | |
| - "main" | |
| pull_request: {} | |
| defaults: | |
| run: | |
| shell: bash | |
| jobs: | |
| test: | |
| name: Test PHP ${{ matrix.php }} | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: true | |
| matrix: | |
| php: ["7.3", "7.4", "8.1", "8.2", "8.3"] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: shivammathur/setup-php@9e72090525849c5e82e596468b86eb55e9cc5401 # v2.32.0 | |
| with: | |
| php-version: ${{ matrix.php }} | |
| tools: "composer" | |
| - name: Cache Composer packages | |
| uses: actions/cache@v4 | |
| with: | |
| path: vendor | |
| key: ${{ runner.os }}-php-${{ matrix.php }}-${{ hashFiles('**/composer.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-php-${{ matrix.php }}- | |
| - name: Install dependencies | |
| run: | | |
| composer install --prefer-dist --no-progress --no-interaction | |
| - name: Lint and formatting | |
| if: >- | |
| matrix.php == '7.4' || | |
| matrix.php == '8.1' || | |
| matrix.php == '8.2' || | |
| matrix.php == '8.3' | |
| run: | | |
| composer run-script format-check | |
| - name: Test | |
| run: | | |
| composer run-script test |