[TASK] Add PHP 8.4 compatibility (#149) #156
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: [push, pull_request] | |
jobs: | |
build-php: | |
name: PHP ${{ matrix.php-versions }} with Composer ${{ matrix.composer-versions }} | |
runs-on: ubuntu-latest | |
strategy: | |
max-parallel: 6 | |
fail-fast: false | |
matrix: | |
php-versions: | |
- "8.1" | |
- "8.2" | |
composer-versions: | |
- "v2" | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@v2 | |
- name: Setup PHP version and composer | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php-versions }} | |
tools: composer:${{ matrix.composer-versions }}, php-cs-fixer | |
- name: Environment Check | |
run: | | |
php --version | |
composer --version | |
- name: Require Composer@v1 | |
if: ${{ matrix.composer-versions == 'v1' }} | |
run: composer require "composer/composer:^1.10" --dev --no-update | |
- name: Require Composer@v2 | |
if: ${{ matrix.composer-versions == 'v2' }} | |
run: composer require "composer/composer:^2.0" --dev --no-update | |
- name: Install composer dependencies | |
if: ${{ matrix.php-versions <= '8.1' }} | |
run: composer update | |
- name: Install composer dependencies PHP 8.2 | |
# @todo: Needed until prophecy (req by phpunit) allows PHP 8.2, https://github.com/phpspec/prophecy/issues/556 | |
if: ${{ matrix.php-versions > '8.1' }} | |
run: composer update --ignore-platform-req=php+ | |
- name: Info | |
run: composer info | |
- name: Lint | |
run: composer test:php:lint | |
- name: CGL | |
if: ${{ matrix.php-versions < '8.1' }} | |
run: vendor/bin/php-cs-fixer fix --dry-run --verbose | |
- name: Unit Tests | |
run: composer test:php:unit |