Improve record type inference documentation #1427
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: build | |
| on: | |
| push: ~ | |
| pull_request: ~ | |
| jobs: | |
| linux_tests: | |
| name: PHP on ${{ matrix.php }} - ${{ matrix.stability }} - ${{ matrix.composer-flags }} | |
| runs-on: ubuntu-22.04 | |
| strategy: | |
| matrix: | |
| php: ['8.2', '8.3', '8.4', '8.5'] | |
| stability: [prefer-lowest, prefer-stable] | |
| include: | |
| - php: '8.6' | |
| stability: prefer-stable | |
| flags: "--ignore-platform-req=php" | |
| fail-fast: false | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup PHP | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: ${{ matrix.php }} | |
| coverage: xdebug | |
| tools: composer:v2 | |
| - name: Check PHP Version | |
| run: php -v | |
| - name: Validate composer files | |
| run: composer validate --strict | |
| - name: Get Composer Cache Directory | |
| id: composer-cache | |
| run: | | |
| echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT | |
| - uses: actions/cache@v5 | |
| with: | |
| path: ${{ steps.composer-cache.outputs.dir }} | |
| key: ${{ runner.os }}-composer-${{ matrix.stability }}-${{ matrix.flags }}-${{ hashFiles('**/composer.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-composer-${{ matrix.stability }}-${{ matrix.flags }}- | |
| ${{ runner.os }}-composer- | |
| # INSTALL logic | |
| # 1. STABLE php + STABLE deps → composer install (NO updates) | |
| - name: Install dependencies (install) | |
| if: ${{ matrix.stability == 'prefer-stable' && matrix.php != '8.6' }} | |
| run: composer install --prefer-dist --no-interaction --no-progress | |
| # 2. prefer-lowest → must use composer update | |
| - name: Install dependencies (prefer-lowest) | |
| if: ${{ matrix.stability == 'prefer-lowest' }} | |
| run: composer update --prefer-lowest --prefer-dist --no-interaction --no-progress | |
| # 3. PHP 8.6 dev → always update | |
| - name: Install dependencies (nightly) | |
| if: ${{ matrix.php == '8.6' }} | |
| run: composer update --prefer-stable --prefer-dist --no-interaction --no-progress ${{ matrix.flags }} | |
| - name: Run Unit tests with coverage | |
| if: ${{ matrix.php != '8.6' }} | |
| run: composer phpunit | |
| - name: Run Unit tests without coverage (nightly) | |
| if: ${{ matrix.php == '8.6' }} | |
| run: composer phpunit | |
| continue-on-error: true | |
| - name: Run static analysis | |
| run: composer phpstan | |
| if: ${{ matrix.php == '8.5' && matrix.stability == 'prefer-stable'}} | |
| - name: Run Coding style rules | |
| run: composer phpcs:fix | |
| if: ${{ matrix.php == '8.5' && matrix.stability == 'prefer-stable'}} |