Skip to content

Symfony 7 compatibility #173

Symfony 7 compatibility

Symfony 7 compatibility #173

Workflow file for this run

name: Test
on:
push:
branches:
- master
paths-ignore:
- '**/README.md'
pull_request:
branches:
- master
paths-ignore:
- '**/README.md'
concurrency:
group: '${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}'
cancel-in-progress: true
jobs:
test:
name: Test
runs-on: ubuntu-20.04
continue-on-error: ${{ matrix.experimental }}
strategy:
fail-fast: true
matrix:
php: ['8.0', '8.1', '8.2', '8.3']
symfony: ['6.0.*', '6.1.*', '6.2.*' , '6.3.*', '6.4.*', '7.0.*']
experimental: [false]
exclude:
- php: '8.0'
symfony: '6.1.*' # Requires PHP >= 8.1 for compatibility
- php: '8.0'
symfony: '6.2.*' # Requires PHP >= 8.1 for compatibility
- php: '8.0'
symfony: '6.3.*' # Requires PHP >= 8.1 for compatibility
- php: '8.0'
symfony: '6.4.*' # Requires PHP >= 8.1 for compatibility
- php: '8.0'
symfony: '7.0.*' # Requires PHP >= 8.2 for compatibility
- php: '8.1'
symfony: '7.0.*' # Requires PHP >= 8.2 for compatibility
include:
- php: '8.4'
symfony: '6.0.*'
experimental: true
- php: '8.4'
symfony: '6.1.*'
experimental: true
- php: '8.4'
symfony: '6.2.*'
experimental: true
- php: '8.4'
symfony: '6.3.*'
experimental: true
- php: '8.4'
symfony: '6.4.*'
experimental: true
- php: '8.4'
symfony: '7.0.*'
experimental: true
steps:
- uses: actions/checkout@v4
- name: Spin up Docker containers
run: make reset-containers
- name: Setup PHP
id: setup-php
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: dom, curl, libxml, mbstring, zip
tools: composer:v2
- name: Validate composer.json and composer.lock
run: composer validate
- name: Install Flex and set Symfony version
run: |
composer global config --no-plugins allow-plugins.symfony/flex true
composer global require symfony/flex
composer config extra.symfony.require ${{ matrix.symfony }}
- name: Get composer cache directory
id: composer-cache
run: echo "dir="$(composer config cache-files-dir)"" >> $GITHUB_OUTPUT
- name: Cache dependencies
uses: actions/cache@v4
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: "key-os-${{ runner.os }}-php-${{matrix.php}}-symfony-${{ matrix.symfony }}-composer-${{ hashFiles('composer.json') }}"
restore-keys: "key-os-${{ runner.os }}-php-${{ matrix.php }}-symfony-${{ matrix.symfony }}-composer-"
- name: Install composer dependencies
if: matrix.experimental == false
run: composer update --prefer-stable
env:
SYMFONY_REQUIRE: ${{ matrix.symfony }}
- name: Install composer dependencies for experimental PHP versions
if: matrix.experimental == true
run: composer update --ignore-platform-req=php+ --prefer-stable
env:
SYMFONY_REQUIRE: ${{ matrix.symfony }}
- name: Install WordPress
run: |
make pause
make install
- name: Launch test suite
run: make test