Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 27 additions & 9 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,17 @@ jobs:
strategy:
fail-fast: false
matrix:
php-version: ['8.3', '8.4']
php-version: ['8.1', '8.2', '8.3', '8.4']
phpunit-version: ['10', '11', '12']
exclude:
# PHPUnit 11 requires PHP 8.2+
- php-version: '8.1'
phpunit-version: '11'
# PHPUnit 12 requires PHP 8.3+
- php-version: '8.1'
phpunit-version: '12'
- php-version: '8.2'
phpunit-version: '12'

steps:
- uses: actions/checkout@v4
Expand All @@ -26,22 +36,30 @@ jobs:
coverage: pcov

- name: Composer install
run: composer update --no-interaction --prefer-dist

- name: Install PHPUnit ${{ matrix.phpunit-version }}
run: composer require --dev phpunit/phpunit:^${{ matrix.phpunit-version }}.0 --no-interaction -W

- name: Determine PHPUnit config
id: phpunit-config
run: |
if [[ ${{ matrix.prefer-lowest == 'prefer-lowest' }} ]]; then
composer update --prefer-stable
if [[ "${{ matrix.phpunit-version }}" == "10" ]]; then
echo "config=phpunit10.xml" >> $GITHUB_OUTPUT
else
composer install
echo "config=phpunit.xml" >> $GITHUB_OUTPUT
fi

- name: Run PHPUnit
run: |
if [[ ${{ matrix.php-version }} == '8.3' ]]; then
bin/phpunit --coverage-clover=coverage.xml
if [[ ${{ matrix.php-version }} == '8.3' && ${{ matrix.phpunit-version }} == '11' ]]; then
bin/phpunit --configuration ${{ steps.phpunit-config.outputs.config }} --coverage-clover=coverage.xml
else
bin/phpunit
bin/phpunit --configuration ${{ steps.phpunit-config.outputs.config }}
fi

- name: Code Coverage Report
if: success() && matrix.php-version == '8.2'
if: success() && matrix.php-version == '8.3' && matrix.phpunit-version == '11'
uses: codecov/codecov-action@v4

code-analysis:
Expand All @@ -56,7 +74,7 @@ jobs:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
php-version: '8.4'
extensions: json, fileinfo
coverage: pcov
tools: pecl
Expand Down
7 changes: 3 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,11 @@
"nyholm/psr7": "^1.0",
"phpmd/phpmd": "^2.15",
"phpstan/phpstan": "^2.1",
"phpunit/phpunit": "^10.0||^11.0||^12.0",
"phpunit/phpunit": "^12.0",
"squizlabs/php_codesniffer": "^3.13",
"symfony/http-foundation": "^6.0||^7.0",
"symfony/phpunit-bridge": "^7.2",
"symfony/psr-http-message-bridge": "^6.0||^7.0",
"symfony/test-pack": "^1.0"
"symfony/phpunit-bridge": "^6.0||^7.0",
"symfony/psr-http-message-bridge": "^6.0||^7.0"
},
"suggest": {
"nyholm/psr7": "f you want to use Symfony's HTTP Foundation Response and Request Objects",
Expand Down
Loading
Loading