Skip to content

feat: add compatibility support for Symfony 5.4, ^6.0 #11

feat: add compatibility support for Symfony 5.4, ^6.0

feat: add compatibility support for Symfony 5.4, ^6.0 #11

Workflow file for this run

name: Test
on:
workflow_dispatch:
push:
branches:
- master
paths-ignore:
- '**/README.md'
pull_request:
branches:
- '**'
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 PHP ${{ matrix.php }} with Symfony ${{ matrix.symfony_version }} and composer flags ${{ matrix.composer-flags }}"
runs-on: ubuntu-latest
strategy:
matrix:
php: ['8.0', '8.1', '8.2', '8.3']
symfony_version: ['5.4.*', '6.0.*', '6.1.*', '6.2.*' , '6.3.*', '6.4.*']
composer-flags: ['--prefer-stable']
exclude:
- php: '8.0'
symfony_version: '5.4.*' # Exclusion due to issues with ECS
- php: '8.0'
symfony_version: '6.1.*' # Requires PHP >= 8.1 for compatibility
- php: '8.0'
symfony_version: '6.2.*' # Requires PHP >= 8.1 for compatibility
- php: '8.0'
symfony_version: '6.3.*' # Requires PHP >= 8.1 for compatibility
- php: '8.0'
symfony_version: '6.4.*' # Requires PHP >= 8.1 for compatibility
steps:
- uses: actions/checkout@v3
- 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
if: ${{ matrix.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_version }}
- name: Get composer cache directory
id: composer-cache
run: echo "dir="$(composer config cache-files-dir)"" >> $GITHUB_OUTPUT
- name: Cache dependencies
uses: actions/cache@v3
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: "key-os-${{ runner.os }}-php-${{matrix.php}}-symfony-${{ matrix.symfony_version }}-composer-${{ hashFiles('composer.json') }}"
restore-keys: "key-os-${{ runner.os }}-php-${{matrix.php}}-symfony-${{ matrix.symfony_version }}-composer-"
- name: Install composer dependencies
run: composer update ${{ matrix.composer-flags }}
env:
SYMFONY_REQUIRE: ${{ matrix.symfony_version }}
- name: Launch test suite
run: make test