Skip to content

Update CI workflow to use current versions of PHP and only Symfony versions still under maintenance #124

Update CI workflow to use current versions of PHP and only Symfony versions still under maintenance

Update CI workflow to use current versions of PHP and only Symfony versions still under maintenance #124

Workflow file for this run

name: Test
on:
push:
pull_request:
jobs:
test:
name: PHP ${{ matrix.php-version }} + Symfony ${{ matrix.symfony-version }}
runs-on: ubuntu-latest
continue-on-error: false
strategy:
fail-fast: false
matrix:
php-version:
- '8.1'
- '8.3'
- '8.4'
# PHPSpec does not yet (2025/12) support PHP 8.5
# - '8.5'
symfony-version:
- '5.4.*'
- '6.4.*'
- '7.4.*'
exclude:
# Symfony 7.4 requires PHP >= 8.2
- php-version: '8.1'
symfony-version: '7.4.*'
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
coverage: none
ini-values: "memory_limit=-1"
php-version: ${{ matrix.php-version }}
tools: composer:v2, flex
- name: Validate composer.json
run: composer validate --no-check-lock
- name: Restore cached dependencies
uses: actions/cache@v4
with:
path: vendor
key: composer-${{ runner.os }}-${{ matrix.php-version }}-${{ matrix.symfony-version }}-${{ hashFiles('composer.json') }}
restore-keys: |
composer-${{ runner.os }}-${{ matrix.php-version }}-${{ matrix.symfony-version }}-
# We currently cannot use Flex to control versions of Symfony and its components, since that would also impose constraints
# that cannot anymore be fulfilled by Goutte.
- name: Configure Symfony version
run: composer require --no-update "symfony/config:${{ matrix.symfony-version }}" "symfony/dependency-injection:${{ matrix.symfony-version }}"
- name: Install dependencies with targeted Symfony version
run: composer install --prefer-dist --no-progress
# env:
# SYMFONY_REQUIRE: ${{ matrix.symfony-version }}
- name: PHPSpec
run: vendor/bin/phpspec run -f pretty
- name: Behat
run: vendor/bin/behat -fprogress --strict