Skip to content

Add Symfony 8 support #1008

Add Symfony 8 support

Add Symfony 8 support #1008

Workflow file for this run

name: Build
on:
push: ~
pull_request: ~
release:
types: [created]
schedule:
-
cron: "0 1 * * 6" # Run at 1am every Saturday
workflow_dispatch: ~
jobs:
tests:
runs-on: ubuntu-latest
name: "PHP ${{ matrix.php }}, Symfony ${{ matrix.symfony }}"
strategy:
fail-fast: false
matrix:
php: ["8.2", "8.3", "8.4", "8.5"]
symfony: ["^6.4", "^7.4", "^8.0"]
exclude:
- php: "8.2"
symfony: "^8.0"
- php: "8.3"
symfony: "^8.0"
steps:
-
uses: actions/checkout@v4
-
name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: "${{ matrix.php }}"
coverage: none
tools: 'composer:v2, flex'
-
name: Restrict Symfony version
if: matrix.symfony != ''
run: |
composer config extra.symfony.require "${{ matrix.symfony }}"
(cd src/Component && composer config extra.symfony.require "${{ matrix.symfony }}")
-
name: Install dependencies
run: |
composer update ${{ matrix.composer-flags }} --no-scripts
(cd src/Component && composer update ${{ matrix.composer-flags }} --no-scripts)
-
name: Run analysis
run: |
composer analyse
(cd src/Component && composer validate --strict)
-
name: Test bundle (with all services)
run: |
rm -rf tests/Application/var/cache
(cd tests/Application && APP_ENV=test bin/console lint:container)
vendor/bin/phpunit --testsuite "SyliusMailerBundle Test Suite"
-
name: Install and test integration with translator component
run: |
composer require symfony/translation:${{ matrix.symfony }}
APP_ENV=test_with_translations vendor/bin/phpunit --testsuite "SyliusMailerBundle Integration Test Suite"
-
name: Run lint container (with no mailers)
run: |
rm -rf tests/Application/var/cache
composer remove symfony/mailer --dev --no-scripts
(cd tests/Application && APP_ENV=test_with_no_mailers bin/console lint:container)