feat: add support for symfony 8 #1653
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: | |
| pull_request: | |
| push: | |
| branches: | |
| - master | |
| - release/** | |
| permissions: | |
| contents: read | |
| jobs: | |
| tests: | |
| name: Tests | |
| runs-on: ubuntu-latest | |
| env: | |
| SYMFONY_REQUIRE: ${{ matrix.symfony-version }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| php: | |
| - '7.2' | |
| - '7.3' | |
| - '7.4' | |
| - '8.0' | |
| - '8.1' | |
| - '8.2' | |
| - '8.3' | |
| - '8.4' | |
| symfony-version: | |
| - 4.4.* | |
| - 5.* | |
| - 6.* | |
| - 7.* | |
| - 8.0.*@dev | |
| dependencies: | |
| - highest | |
| exclude: | |
| - php: '7.2' | |
| symfony-version: 6.* | |
| - php: '7.3' | |
| symfony-version: 6.* | |
| - php: '7.4' | |
| symfony-version: 6.* | |
| - php: '7.2' | |
| symfony-version: 7.* | |
| - php: '7.3' | |
| symfony-version: 7.* | |
| - php: '7.4' | |
| symfony-version: 7.* | |
| - php: '8.0' | |
| symfony-version: 7.* | |
| - php: '8.1' | |
| symfony-version: 7.* | |
| - php: '8.4' | |
| symfony-version: 4.4.* | |
| - php: '7.2' | |
| symfony-version: 8.0.*@dev | |
| - php: '7.3' | |
| symfony-version: 8.0.*@dev | |
| - php: '7.4' | |
| symfony-version: 8.0.*@dev | |
| - php: '8.0' | |
| symfony-version: 8.0.*@dev | |
| - php: '8.1' | |
| symfony-version: 8.0.*@dev | |
| - php: '8.2' | |
| symfony-version: 8.0.*@dev | |
| - php: '8.3' | |
| symfony-version: 8.0.*@dev | |
| include: | |
| - php: '7.2' | |
| symfony-version: 4.4.* | |
| dependencies: lowest | |
| - php: '7.2' | |
| symfony-version: 5.* | |
| dependencies: lowest | |
| - php: '8.0' | |
| symfony-version: 6.* | |
| dependencies: lowest | |
| - php: '8.2' | |
| symfony-version: 7.* | |
| dependencies: lowest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v5 | |
| with: | |
| fetch-depth: 2 | |
| - name: Setup PHP | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: ${{ matrix.php }} | |
| coverage: pcov | |
| tools: flex | |
| - name: Setup Problem Matchers for PHPUnit | |
| run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json" | |
| - name: Allow Symfony 8 pre-releases | |
| if: contains(matrix.symfony-version, '8.') | |
| run: | | |
| composer config minimum-stability dev | |
| composer config prefer-stable true | |
| # These dependencies are not used running the tests but can cause deprecation warnings so we remove them before running the tests | |
| - name: Remove unused dependencies | |
| run: composer remove vimeo/psalm phpstan/phpstan friendsofphp/php-cs-fixer --dev --no-interaction --no-update | |
| - name: Install dependencies | |
| uses: ramsey/composer-install@v3 | |
| with: | |
| dependency-versions: ${{ matrix.dependencies }} | |
| composer-options: --prefer-dist | |
| - name: Run tests | |
| run: vendor/bin/phpunit --coverage-clover=build/coverage-report.xml | |
| - name: Upload code coverage | |
| uses: codecov/codecov-action@v5 | |
| with: | |
| file: build/coverage-report.xml | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| missing-optional-packages-tests: | |
| name: Tests without optional packages | |
| runs-on: ubuntu-latest | |
| env: | |
| SYMFONY_REQUIRE: ${{ matrix.symfony-version }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - php: '7.2' | |
| dependencies: lowest | |
| symfony-version: 4.4.* | |
| - php: '7.4' | |
| dependencies: highest | |
| - php: '8.0' | |
| dependencies: lowest | |
| symfony-version: 4.4.* | |
| - php: '8.4' | |
| dependencies: highest | |
| symfony-version: 8.0.*@dev | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v5 | |
| - name: Setup PHP | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: ${{ matrix.php }} | |
| coverage: pcov | |
| tools: flex | |
| - name: Setup Problem Matchers for PHPUnit | |
| run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json" | |
| - name: Remove optional packages | |
| run: composer remove doctrine/dbal doctrine/doctrine-bundle symfony/messenger symfony/twig-bundle symfony/cache symfony/http-client --dev --no-update | |
| - name: Allow Symfony 8 pre-releases | |
| if: contains(matrix.symfony-version || '', '8.') | |
| run: | | |
| composer config minimum-stability dev | |
| composer config prefer-stable true | |
| - name: Install dependencies | |
| uses: ramsey/composer-install@v3 | |
| with: | |
| dependency-versions: ${{ matrix.dependencies }} | |
| composer-options: --prefer-dist | |
| - name: Run tests | |
| run: vendor/bin/phpunit --coverage-clover=build/coverage-report.xml | |
| - name: Upload code coverage | |
| uses: codecov/codecov-action@v5 | |
| with: | |
| file: build/coverage-report.xml | |
| token: ${{ secrets.CODECOV_TOKEN }} |