feat: drop support for PHP < 8.1 #248
Workflow file for this run
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: "build" | |
on: | |
push: | |
branches: | |
- "master" | |
pull_request: ~ | |
workflow_dispatch: ~ | |
jobs: | |
coding-standards: | |
name: "Coding Standards" | |
runs-on: "ubuntu-latest" | |
strategy: | |
matrix: | |
php-version: | |
- "8.1" | |
dependencies: | |
- "highest" | |
steps: | |
- name: "Checkout" | |
uses: "actions/checkout@v3" | |
- name: "Setup PHP, with composer and extensions" | |
uses: "shivammathur/setup-php@v2" | |
with: | |
php-version: "${{ matrix.php-version }}" | |
extensions: "${{ env.PHP_EXTENSIONS }}" | |
coverage: "none" | |
- name: "Install composer dependencies" | |
uses: "ramsey/composer-install@v2" | |
with: | |
dependency-versions: "${{ matrix.dependencies }}" | |
- name: "Validate composer" | |
run: "composer validate --strict" | |
- name: "Check style" | |
run: "composer check-style" | |
dependency-analysis: | |
name: "Dependency Analysis" | |
runs-on: "ubuntu-latest" | |
strategy: | |
matrix: | |
php-version: | |
- "8.1" | |
- "8.2" | |
- "8.3" | |
dependencies: | |
- "highest" | |
symfony: | |
- "^5.4" | |
- "^6.0" | |
steps: | |
- name: "Checkout" | |
uses: "actions/checkout@v3" | |
- name: "Setup PHP, with composer and extensions" | |
uses: "shivammathur/setup-php@v2" | |
with: | |
coverage: "none" | |
extensions: "${{ env.PHP_EXTENSIONS }}" | |
php-version: "${{ matrix.php-version }}" | |
tools: "composer-require-checker, composer-unused, flex" | |
- name: "Install composer dependencies" | |
uses: "ramsey/composer-install@v2" | |
env: | |
SYMFONY_REQUIRE: "${{ matrix.symfony }}" | |
with: | |
dependency-versions: "${{ matrix.dependencies }}" | |
- name: "Run maglnet/composer-require-checker" | |
run: "composer-require-checker check" | |
- name: "Run composer-unused/composer-unused" | |
run: "composer-unused" | |
static-code-analysis: | |
name: "Static Code Analysis" | |
runs-on: "ubuntu-latest" | |
strategy: | |
matrix: | |
php-version: | |
- "8.1" | |
- "8.2" | |
- "8.3" | |
dependencies: | |
- "highest" | |
symfony: | |
- "^5.4" | |
- "^6.0" | |
steps: | |
- name: "Checkout" | |
uses: "actions/checkout@v3" | |
- name: "Setup PHP, with composer and extensions" | |
uses: "shivammathur/setup-php@v2" | |
with: | |
php-version: "${{ matrix.php-version }}" | |
extensions: "${{ env.PHP_EXTENSIONS }}" | |
coverage: "none" | |
tools: "flex" | |
- name: "Install composer dependencies" | |
uses: "ramsey/composer-install@v2" | |
env: | |
SYMFONY_REQUIRE: "${{ matrix.symfony }}" | |
with: | |
dependency-versions: "${{ matrix.dependencies }}" | |
- name: "Static analysis" | |
run: "vendor/bin/psalm --php-version=${{ matrix.php-version }}" | |
unit-tests: | |
name: "Unit tests" | |
runs-on: "ubuntu-latest" | |
strategy: | |
matrix: | |
php-version: | |
- "8.1" | |
- "8.2" | |
- "8.3" | |
dependencies: | |
- "lowest" | |
- "highest" | |
symfony: | |
- "^5.4" | |
- "^6.0" | |
exclude: | |
- php-version: "7.4" | |
symfony: "^6.0" | |
steps: | |
- name: "Checkout" | |
uses: "actions/checkout@v3" | |
- name: "Setup PHP, with composer and extensions" | |
uses: "shivammathur/setup-php@v2" | |
with: | |
php-version: "${{ matrix.php-version }}" | |
extensions: "${{ env.PHP_EXTENSIONS }}" | |
coverage: "none" | |
tools: "flex" | |
- name: "Install composer dependencies" | |
uses: "ramsey/composer-install@v2" | |
env: | |
SYMFONY_REQUIRE: "${{ matrix.symfony }}" | |
with: | |
dependency-versions: "${{ matrix.dependencies }}" | |
- name: "Run phpunit" | |
run: "composer phpunit" | |
code-coverage: | |
name: "Code Coverage" | |
runs-on: "ubuntu-latest" | |
strategy: | |
matrix: | |
php-version: | |
- "8.2" | |
dependencies: | |
- "highest" | |
steps: | |
- name: "Checkout" | |
uses: "actions/checkout@v3" | |
- name: "Setup PHP, with composer and extensions" | |
uses: "shivammathur/setup-php@v2" | |
with: | |
coverage: "pcov" | |
extensions: "${{ env.PHP_EXTENSIONS }}" | |
php-version: "${{ matrix.php-version }}" | |
- name: "Set up problem matchers for phpunit/phpunit" | |
run: "echo \"::add-matcher::${{ runner.tool_cache }}/phpunit.json\"" | |
- name: "Install composer dependencies" | |
uses: "ramsey/composer-install@v2" | |
with: | |
dependency-versions: "${{ matrix.dependencies }}" | |
- name: "Collect code coverage with pcov and phpunit/phpunit" | |
run: "vendor/bin/phpunit --coverage-clover=.build/logs/clover.xml" | |
- name: "Send code coverage report to Codecov.io" | |
env: | |
CODECOV_TOKEN: "${{ secrets.CODECOV_TOKEN }}" | |
run: "bash <(curl -s https://codecov.io/bash)" |