Skip to content

added support for symfony7 #136

added support for symfony7

added support for symfony7 #136

Workflow file for this run

name: PHP Tests
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
quality:
runs-on: 'ubuntu-20.04'
steps:
- uses: actions/checkout@v3
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '7.4'
- name: Cache Composer packages
id: composer-cache
uses: actions/cache@v3
with:
path: vendor
key: ${{ runner.os }}-quality-php-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-quality-php
- name: Require symfony quality tools
run: |
composer require --dev --no-update \
phpstan/phpstan \
squizlabs/php_codesniffer \
phpstan/phpstan-phpunit \
doctrine/coding-standard:^8.0 \
phpstan/phpstan-symfony
- name: Install dependencies
run: composer install --prefer-dist --no-progress --no-suggest
- name: Run phpcs
run: ./vendor/bin/phpcs
- name: Run phpstan
run: ./vendor/bin/phpstan analyse
test:
strategy:
matrix:
os: ['ubuntu-18.04', 'ubuntu-20.04']
version: [ '7.4', '8.0', '8.1', '8.2']
include:
- os: 'ubuntu-18.04'
version: '7.2'
- os: 'ubuntu-18.04'
version: '7.3'
- os: 'ubuntu-20.04'
version: '7.4'
symfony: '^4.0'
- os: 'ubuntu-20.04'
version: '7.4'
symfony: '^5.0'
- os: 'ubuntu-20.04'
version: '8.1'
symfony: '^6.0'
- os: 'ubuntu-20.04'
version: '8.2'
symfony: '^7.0'
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.version }}
- name: Cache Composer packages
id: composer-cache
uses: actions/cache@v3
with:
path: vendor
key: ${{ runner.os }}-php-${{ matrix.version }}-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-php-${{ matrix.version }}
- name: Validate composer.json and composer.lock
run: composer validate
- name: Require symfony
if: ${{ matrix.symfony }}
run: |
composer require --no-update symfony/process:${{ matrix.symfony }} \
symfony/console:${{ matrix.symfony }} \
symfony/serializer:${{ matrix.symfony }} \
symfony/dependency-injection:${{ matrix.symfony }} \
symfony/event-dispatcher:${{ matrix.symfony }} \
symfony/yaml:${{ matrix.symfony }} \
symfony/expression-language:${{ matrix.symfony }}
- name: Install dependencies
run: composer install --prefer-dist --no-progress --no-suggest
# Add a test script to composer.json, for instance: "test": "vendor/bin/phpunit"
# Docs: https://getcomposer.org/doc/articles/scripts.md
- name: Run PHPUnit
run: ./vendor/bin/phpunit --fail-on-warning
- name: Run Behat
run: ./vendor/bin/behat --colors --strict --stop-on-failure