Skip to content

Symfony 7 support

Symfony 7 support #18

Workflow file for this run

name: 'CI'
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
cs-fixer:
name: 'PHP CS Fixer'
runs-on: 'ubuntu-latest'
strategy:
matrix:
php-version:
- '8.2'
steps:
-
name: 'Check out'
uses: 'actions/checkout@v4'
-
name: 'Set up PHP'
uses: 'shivammathur/setup-php@v2'
with:
php-version: '${{ matrix.php-version }}'
coverage: 'none'
-
name: 'Get Composer cache directory'
id: 'composer-cache'
run: 'echo "cache_dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT'
-
name: 'Cache dependencies'
uses: 'actions/cache@v3'
with:
path: '${{ steps.composer-cache.outputs.cache_dir }}'
key: "php-${{ matrix.php-version }}-composer-locked-${{ hashFiles('composer.lock') }}"
restore-keys: 'php-${{ matrix.php-version }}-composer-locked-'
-
name: 'Install dependencies'
run: 'composer install --no-progress'
-
name: 'Check the code style'
run: 'make cs'
phpstan:
name: 'PhpStan'
runs-on: 'ubuntu-latest'
strategy:
matrix:
php-version:
- '8.2'
steps:
-
name: 'Check out'
uses: 'actions/checkout@v4'
-
name: 'Set up PHP'
uses: 'shivammathur/setup-php@v2'
with:
php-version: '${{ matrix.php-version }}'
coverage: 'none'
-
name: 'Get Composer cache directory'
id: 'composer-cache'
run: 'echo "cache_dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT'
-
name: 'Cache dependencies'
uses: 'actions/cache@v3'
with:
path: '${{ steps.composer-cache.outputs.cache_dir }}'
key: "php-${{ matrix.php-version }}-composer-locked-${{ hashFiles('composer.lock') }}"
restore-keys: 'php-${{ matrix.php-version }}-composer-locked-'
-
name: 'Install dependencies'
run: 'composer install --no-progress'
-
name: 'Run PhpStan'
run: 'vendor/bin/phpstan analyze --no-progress'
tests:
name: 'PHPUnit'
runs-on: 'ubuntu-latest'
strategy:
matrix:
include:
-
php-version: '8.2'
composer-options: '--prefer-stable'
symfony-version: '6.3'
-
php-version: '8.2'
composer-options: '--prefer-stable'
symfony-version: '^6.4'
-
php-version: '8.2'
composer-options: '--prefer-stable'
symfony-version: '^7.0'
steps:
-
name: 'Check out'
uses: 'actions/checkout@v4'
-
name: 'Set up PHP'
uses: 'shivammathur/setup-php@v2'
with:
php-version: '${{ matrix.php-version }}'
coverage: 'none'
-
name: 'Get Composer cache directory'
id: 'composer-cache'
run: 'echo "cache_dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT'
-
name: 'Cache dependencies'
uses: 'actions/cache@v3'
with:
path: '${{ steps.composer-cache.outputs.cache_dir }}'
key: "php-${{ matrix.php-version }}-composer-locked-${{ hashFiles('composer.lock') }}"
restore-keys: 'php-${{ matrix.php-version }}-composer-locked-'
-
name: 'Install dependencies'
env:
COMPOSER_OPTIONS: '${{ matrix.composer-options }}'
SYMFONY_REQUIRE: '${{ matrix.symfony-version }}'
run: |
composer global config --no-plugins allow-plugins.symfony/flex true
composer global require --no-progress --no-scripts --no-plugins symfony/flex
composer update --no-progress $COMPOSER_OPTIONS
-
name: 'Run tests'
run: make phpunit