Skip to content

PHPUnit 12 compatibility fixes and test refactor #759

PHPUnit 12 compatibility fixes and test refactor

PHPUnit 12 compatibility fixes and test refactor #759

Workflow file for this run

name: build
on: [push, pull_request]
env:
COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }}
jobs:
phpstan:
runs-on: ubuntu-24.04
name: PHPStan
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.3
- run: |
composer require --no-update liip/imagine-bundle:"^2.13" phpstan/phpstan:"^2"
composer install --ignore-platform-reqs
XDEBUG_MODE=off vendor/bin/phpstan
cs-fixer:
runs-on: ubuntu-24.04
name: PHP-CS-Fixer
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Fix CS
uses: docker://oskarstark/php-cs-fixer-ga
with:
args: --diff --dry-run
twig-cs-fixer:
runs-on: ubuntu-24.04
name: Twig-CS-Fixer
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Require the vendor
run: composer require --dev --no-update vincentlanglet/twig-cs-fixer ^3.5
- name: Update
run: composer update --no-interaction --no-progress
- name: Run
run: vendor/bin/twig-cs-fixer lint templates
validate-markdown:
runs-on: ubuntu-24.04
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Validate
uses: avto-dev/markdown-lint@v1
with:
config: './.github/workflows/config/config.json'
args: './docs ./CONTRIBUTING.md ./README.md ./UPDATE.md'
tests:
runs-on: ubuntu-24.04
strategy:
matrix:
php:
- '8.3'
- '8.4'
dependencies: [highest]
symfony: ['*']
with_imagine: [false]
with_oneupbundle: [true]
max_deprecations: [0]
include:
- php: '8.3'
symfony: '7.3.*'
dependencies: highest
with_imagine: false
with_oneupbundle: false
max_deprecations: 0
- php: '8.4'
symfony: '7.4.*@dev'
dependencies: highest
with_imagine: false
with_oneupbundle: false
max_deprecations: 6
name: PHP ${{ matrix.php }} with Symfony ${{ matrix.symfony }} tests with ${{ matrix.dependencies }} dependencies
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Cache
uses: actions/cache@v4
with:
path: ~/.composer/cache/files
key: ${{ matrix.php }}-${{ matrix.symfony }}-${{ matrix.dependencies }}
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: mongodb-stable, pdo_sqlite
- run: |
composer global config --no-plugins allow-plugins.symfony/flex true
composer global require --no-interaction --no-progress symfony/flex:^2.8
composer config extra.symfony.require ${{ matrix.symfony }}
if: matrix.symfony != '*'
- name: use possible dev deps
if: contains(matrix.symfony, '@dev')
run: |
composer config minimum-stability dev
composer config prefer-stable true
- run: composer require --no-update liip/imagine-bundle:"^2.0"
if: matrix.with_imagine
- run: composer require --no-update oneup/flysystem-bundle:"^4.0.1"
if: matrix.with_oneupbundle
- name: Update project dependencies
uses: ramsey/composer-install@v2
with:
dependency-versions: ${{ matrix.dependencies }}
- name: Run tests
run: vendor/bin/phpunit
env:
SYMFONY_DEPRECATIONS_HELPER: max[self]=${{matrix.max_deprecations}}