Skip to content

Commit c3fabd0

Browse files
committed
Add PHP 8.2 to Unit Tests GHA
1 parent 9cbf480 commit c3fabd0

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

.github/workflows/test-phpunit.yml

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ jobs:
3636
strategy:
3737
fail-fast: false
3838
matrix:
39-
php-versions: ['7.4', '8.0', '8.1']
39+
php-versions: ['7.4', '8.0', '8.1', '8.2']
4040
db-platforms: ['MySQLi', 'Postgre', 'SQLite3', 'SQLSRV', 'OCI8']
4141
mysql-versions: ['5.7']
4242
include:
@@ -150,10 +150,18 @@ jobs:
150150
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
151151
restore-keys: ${{ runner.os }}-composer-
152152

153+
# remove when PHP 8.2 is generally available
154+
- name: Ignore option for PHP version
155+
uses: actions/github-script@v6
156+
id: composer-ignore-php-option
157+
with:
158+
script: 'return "${{ matrix.php-versions }}" == "8.2" ? "--ignore-platform-req=php" : ""'
159+
result-encoding: string
160+
153161
- name: Install dependencies
154162
run: |
155-
composer update --ansi --no-interaction
156-
composer remove --ansi --dev --unused -W -- rector/rector phpstan/phpstan friendsofphp/php-cs-fixer nexusphp/cs-config codeigniter/coding-standard
163+
composer update --ansi --no-interaction ${{ steps.composer-ignore-php-option.outputs.result }}
164+
composer remove --ansi --dev --unused ${{ steps.composer-ignore-php-option.outputs.result }} -W -- rector/rector phpstan/phpstan friendsofphp/php-cs-fixer nexusphp/cs-config codeigniter/coding-standard
157165
env:
158166
COMPOSER_AUTH: ${{ secrets.COMPOSER_AUTH }}
159167

0 commit comments

Comments
 (0)