Skip to content

Add support for symfony 8.x #119

Add support for symfony 8.x

Add support for symfony 8.x #119

Workflow file for this run

# This file was heavily based on the ci-file from SymfonyCasts/verify-email-bundle
#
# See https://github.com/SymfonyCasts/verify-email-bundle
# https://github.com/SymfonyCasts/verify-email-bundle/blob/main/.github/workflows/ci.yml
name: CI
on:
push:
branches: ['main','master','5.4','6.0']
pull_request:
jobs:
static-analysis:
name: Static Analysis
runs-on: ubuntu-latest
steps:
- name: "Checkout code"
uses: "actions/checkout@v4"
- name: "Install PHP"
uses: "shivammathur/setup-php@v2"
with:
coverage: "none"
php-version: "8.4"
extensions: pdo, pdo_sqlite
tools: composer:v2, composer-normalize:2.48.x
- name: "Validate composer.json"
run: |
composer validate --strict --no-check-lock
composer-normalize --dry-run
- name: "Validate php-files"
run: "php -l src && php -l tests"
- name: "Composer install"
uses: "ramsey/composer-install@v3"
with:
composer-options: "--prefer-stable"
dependency-versions: 'highest'
- name: "Trigger install for PHPUnit dependencies"
run: "vendor/bin/simple-phpunit --version"
- name: "Check declared dependencies"
run: "vendor/bin/composer-require-checker check"
- name: "PHPStan"
run: "vendor/bin/phpstan analyze"
- name: "PHPCompatibility"
run: "vendor/bin/phpcs src/ tests/ --standard=PHPCompatibility --runtime-set testVersion 8.1-8.4"
- name: PHP-CS-Fixer
uses: docker://ghcr.io/php-cs-fixer/php-cs-fixer:3.64-php8.3
with:
args: "check"
# use `check .` if your repository not having paths configured in .php-cs-fixer[.dist].php
tests:
name: "Tests ${{ matrix.php-version }} ${{ matrix.dependency-versions }}"
runs-on: ubuntu-latest
needs: static-analysis
strategy:
fail-fast: false
matrix:
# normal, highest, non-dev installs
php-version: ['8.2', '8.3', '8.4', '8.5']
composer-options: ['--prefer-stable']
dependency-versions: ['highest']
include:
# testing lowest PHP version with lowest dependencies
- php-version: '8.2'
dependency-versions: 'lowest'
composer-options: '--prefer-lowest'
env:
SYMFONY_PHPUNIT_VERSION: 9
steps:
- name: "Checkout code"
uses: "actions/checkout@v4"
- name: "Install PHP"
uses: "shivammathur/setup-php@v2"
with:
coverage: "none"
php-version: "${{ matrix.php-version }}"
extensions: pdo, pdo_sqlite
# - name: Install Global Dependencies
# run: |
# composer global require --no-progress --no-scripts --no-plugins symfony/flex >=1.x
- name: "Composer install"
uses: "ramsey/composer-install@v3"
with:
dependency-versions: "${{ matrix.dependency-versions }}"
composer-options: "--prefer-dist --no-progress"
- name: Unit Tests
run: vendor/bin/simple-phpunit
env:
SYMFONY_PHPUNIT_VERSION: "${{ matrix.dependency-versions == 'lowest' && '9' || '' }}"
- name: Install symlinks for demo's
uses: "ramsey/composer-install@v3"
with:
dependency-versions: "${{ matrix.dependency-versions }}"
composer-options: "--prefer-dist --no-progress"
working-directory: "demo"
- name: Demo symfony6.x - Install dependencies
uses: "ramsey/composer-install@v3"
with:
dependency-versions: "${{ matrix.dependency-versions }}"
composer-options: "--prefer-dist --no-progress"
working-directory: "demo/symfony6.x"
- name: Demo symfony6.x - Unit Tests
run: demo/symfony6.x/vendor/bin/simple-phpunit -c demo/symfony6.x/phpunit.xml.dist
- name: Demo symfony6.x-orm3 - Install dependencies
uses: "ramsey/composer-install@v3"
with:
dependency-versions: "${{ matrix.dependency-versions }}"
composer-options: "--prefer-dist --no-progress"
working-directory: "demo/symfony6.x-orm3"
- name: Demo symfony6.x-orm3 - Unit Tests
run: demo/symfony6.x/vendor/bin/simple-phpunit -c demo/symfony6.x-orm3/phpunit.xml.dist
- name: Demo symfony6.x-types - Install dependencies
uses: "ramsey/composer-install@v3"
with:
dependency-versions: "${{ matrix.dependency-versions }}"
composer-options: "--prefer-dist --no-progress"
working-directory: "demo/symfony6.x-types"
- name: Demo symfony6.x-types - Unit Tests
run: demo/symfony6.x/vendor/bin/simple-phpunit -c demo/symfony6.x-types/phpunit.xml.dist
- name: Demo symfony7.x - Install dependencies
uses: "ramsey/composer-install@v3"
with:
dependency-versions: "${{ matrix.dependency-versions }}"
composer-options: "--prefer-dist --no-progress"
working-directory: "demo/symfony7.x"
if: ${{ startsWith(matrix.php-version , '8.2') || startsWith(matrix.php-version , '8.3') || startsWith(matrix.php-version , '8.4') || startsWith(matrix.php-version , '8.5') }}
- name: Demo symfony7.x - Unit Tests
run: demo/symfony7.x/vendor/bin/simple-phpunit -c demo/symfony7.x/phpunit.xml.dist
if: ${{ startsWith(matrix.php-version , '8.2') || startsWith(matrix.php-version , '8.3') || startsWith(matrix.php-version , '8.4') || startsWith(matrix.php-version , '8.5') }}
- name: Demo symfony7.x-types - Install dependencies
uses: "ramsey/composer-install@v3"
with:
dependency-versions: "${{ matrix.dependency-versions }}"
composer-options: "--prefer-dist --no-progress"
working-directory: "demo/symfony7.x-types"
if: ${{ startsWith(matrix.php-version , '8.2') || startsWith(matrix.php-version , '8.3') || startsWith(matrix.php-version , '8.4') || startsWith(matrix.php-version , '8.5') }}
- name: Demo symfony7.x-types - Unit Tests
run: demo/symfony7.x-types/vendor/bin/simple-phpunit -c demo/symfony7.x-types/phpunit.xml.dist
if: ${{ startsWith(matrix.php-version , '8.2') || startsWith(matrix.php-version , '8.3') || startsWith(matrix.php-version , '8.4') || startsWith(matrix.php-version , '8.5') }}
- name: Demo symfony8.x - Install dependencies
uses: "ramsey/composer-install@v3"
with:
dependency-versions: "${{ matrix.dependency-versions }}"
composer-options: "--prefer-dist --no-progress"
working-directory: "demo/symfony8.x"
if: ${{ startsWith(matrix.php-version , '8.4') || startsWith(matrix.php-version , '8.5') }}
- name: Demo symfony8.x - Unit Tests
run: demo/symfony8.x/vendor/bin/simple-phpunit -c demo/symfony8.x/phpunit.xml.dist
if: ${{ startsWith(matrix.php-version , '8.4') || startsWith(matrix.php-version , '8.5') }}
- name: Demo symfony8.x-types - Install dependencies
uses: "ramsey/composer-install@v3"
with:
dependency-versions: "${{ matrix.dependency-versions }}"
composer-options: "--prefer-dist --no-progress"
working-directory: "demo/symfony8.x-types"
if: ${{ startsWith(matrix.php-version , '8.4') || startsWith(matrix.php-version , '8.5') }}
- name: Demo symfony8.x-types - Unit Tests
run: demo/symfony8.x-types/vendor/bin/simple-phpunit -c demo/symfony8.x-types/phpunit.xml.dist
if: ${{ startsWith(matrix.php-version , '8.4') || startsWith(matrix.php-version , '8.5') }}