Skip to content

Commit d98cd4e

Browse files
Update composer.json to allow PHP 8 (#24)
* Update composer.json to allow PHP 8 * Update php.yml Co-authored-by: Martin Helmich <kontakt@martin-helmich.de>
1 parent d1733a6 commit d98cd4e

File tree

2 files changed

+14
-5
lines changed

2 files changed

+14
-5
lines changed

.github/workflows/php.yml

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,20 @@ jobs:
1414
matrix:
1515
php: ['7.2', '7.3', '7.4']
1616
phpunit: ['8.0', '9.0']
17+
composer-arg: ['']
18+
include:
19+
- php: '8.0'
20+
phpunit: '9.0'
21+
composer-arg: 'ignore-platform-req=php'
1722
exclude:
23+
- php: '8.0'
24+
phpunit: '8.0'
1825
- php: '7.2'
1926
phpunit: '9.0'
2027
runs-on: ubuntu-latest
21-
28+
continue-on-error: ${{ matrix.php == '8.0' }}
29+
name: PHP ${{ matrix.php }}, PHPUnit ${{ matrix.phpunit }}
30+
2231
steps:
2332
- uses: actions/checkout@v1
2433

@@ -28,7 +37,7 @@ jobs:
2837
php-version: ${{ matrix.php }}
2938
extensions: mbstring, intl, json
3039
coverage: pcov
31-
40+
tools: composer:v2
3241
- name: Validate composer.json and composer.lock
3342
run: composer validate
3443

@@ -37,7 +46,7 @@ jobs:
3746
composer require --no-update --dev phpunit/phpunit ~${{ matrix.phpunit }}
3847
3948
- name: Install dependencies
40-
run: composer install --prefer-dist --no-progress --no-suggest
49+
run: composer install --prefer-dist --no-progress --no-suggest --${{ matrix.composer-arg }}
4150

4251
#- name: Run type checker
4352
# run: ./vendor/bin/psalm

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
}
1010
],
1111
"require": {
12-
"php": "^7.2",
12+
"php": "^7.2 || ^8.0",
1313
"flow/jsonpath": "^0.5.0",
1414
"justinrainbow/json-schema": "^5.0"
1515
},
@@ -32,4 +32,4 @@
3232
"config": {
3333
"sort-packages": true
3434
}
35-
}
35+
}

0 commit comments

Comments
 (0)