Skip to content

Commit c8c4556

Browse files
authored
feat: compatibility with PHP 8.4 (#433)
* chore: bump deps and fix tests * use normal phpunit * fix * fix 8.4 * fix PHPUnit config * fix * fix * run PHP CS Fixer on 8.3 * fix e2e tests * fix coverage
1 parent d4183e2 commit c8c4556

26 files changed

+1305
-1273
lines changed

Diff for: .github/workflows/ci.yml

+10-15
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,9 @@ jobs:
1515
strategy:
1616
matrix:
1717
php:
18-
- '7.4'
19-
- '8.0'
20-
- '8.1'
2118
- '8.2'
2219
- '8.3'
23-
include:
24-
- php: '8.3'
25-
latest: true
20+
- '8.4'
2621
fail-fast: false
2722
steps:
2823
- uses: actions/checkout@v4
@@ -47,39 +42,39 @@ jobs:
4742

4843
- name: Install prerequisites
4944
run: |
50-
wget -O box.phar https://github.com/humbug/box/releases/download/4.5.1/box.phar
45+
wget -O box.phar https://github.com/humbug/box/releases/download/4.6.2/box.phar
5146
echo "BOX_BIN=$(pwd)/box.phar" >> $GITHUB_ENV
5247
sudo chown -R $(whoami):$(whoami) .
5348
5449
- name: Install dependencies
55-
if: matrix.latest
50+
if: "matrix.php == '8.4'"
5651
run: composer install --prefer-dist --no-interaction --no-progress --ansi
5752

5853
- name: Update dependencies
59-
if: '!matrix.latest'
54+
if: "matrix.php != '8.4'"
6055
run: composer update --no-interaction --no-progress --ansi
6156

6257
- name: Enable code coverage
63-
if: matrix.latest
58+
if: "matrix.php == '8.4'"
6459
run: echo "COVERAGE=1" >> $GITHUB_ENV
6560

6661
- name: Run PHPUnit
67-
run: vendor/bin/simple-phpunit ${{ matrix.latest && '--coverage-clover build/logs/phpunit/clover.xml' || '' }}
62+
run: vendor/bin/phpunit ${{ matrix.php == '8.4' && '--coverage-clover build/logs/phpunit/clover.xml' || '' }}
6863

6964
- name: Run PHP CS Fixer
70-
if: matrix.latest
65+
if: "matrix.php == '8.3'"
7166
run: php-cs-fixer fix --dry-run --format=checkstyle --ansi | cs2pr
7267

7368
- name: Run PHPStan
74-
if: matrix.latest
69+
if: "matrix.php == '8.4'"
7570
run: vendor/bin/phpstan analyse --ansi
7671

7772
- name: Run e2e tests
78-
if: matrix.latest
73+
if: "matrix.php == '8.4'"
7974
run: bin/compile
8075

8176
- name: Upload coverage results to Coveralls
82-
if: matrix.latest
77+
if: "matrix.php == '8.4'"
8378
env:
8479
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
8580
run: |

Diff for: .github/workflows/release.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
- name: Setup PHP with extensions
1717
uses: shivammathur/setup-php@v2
1818
with:
19-
php-version: '8.3'
19+
php-version: '8.4'
2020
extensions: json
2121
ini-values: memory_limit=-1
2222
tools: composer

Diff for: composer.json

+13-16
Original file line numberDiff line numberDiff line change
@@ -39,30 +39,27 @@
3939
"friendsofphp/php-cs-fixer": "^2.15 || ^3.0",
4040
"league/html-to-markdown": "^5.0",
4141
"psr/log": "^1.0 || ^2.0 || ^3.0",
42-
"symfony/config": "^5.2 || ^6.0 || ^7.0" ,
43-
"symfony/console": "^5.2 || ^6.0 || ^7.0",
44-
"symfony/yaml": "^5.2 || ^6.0 || ^7.0",
45-
"symfony/filesystem": "^5.2 || ^6.0 || ^7.0",
42+
"symfony/config": "^5.4 || ^6.4 || ^7.0" ,
43+
"symfony/console": "^5.4 || ^6.4 || ^7.0",
44+
"symfony/yaml": "^5.4 || ^6.4 || ^7.0",
45+
"symfony/filesystem": "^5.4 || ^6.4 || ^7.0",
4646
"twig/twig": "^3.0",
4747
"nette/php-generator": "^3.6 || ^4.0",
4848
"nikic/php-parser": "^4.13 || ^5.0",
4949
"devizzent/cebe-php-openapi": "^1.0.3",
50-
"symfony/string": "^5.2 || ^6.0 || ^7.0"
50+
"symfony/string": "^5.4 || ^6.4 || ^7.0"
5151
},
5252
"require-dev": {
53-
"api-platform/core": "^2.7 || ^3.0",
54-
"doctrine/orm": "^2.7",
53+
"api-platform/core": "^3.0 || ^4.0",
54+
"doctrine/orm": "^2.7 || ^3.0",
5555
"myclabs/php-enum": "^1.7",
56-
"symfony/doctrine-bridge": "^5.2 || ^6.0 || ^7.0",
57-
"symfony/phpunit-bridge": "^5.2 || ^6.0 || ^7.0",
58-
"symfony/serializer": "^5.2 || ^6.0 || ^7.0",
59-
"symfony/validator": "^5.2 || ^6.0 || ^7.0",
56+
"symfony/doctrine-bridge": "^5.4 || ^6.4 || ^7.0",
57+
"symfony/phpunit-bridge": "^5.4 || ^6.4 || ^7.0",
58+
"symfony/serializer": "^5.4 || ^6.4 || ^7.0",
59+
"symfony/validator": "^5.4 || ^6.4 || ^7.0",
6060
"phpspec/prophecy-phpunit": "^2.0",
61-
"phpstan/phpstan": "^1.2.0",
62-
"symfony/finder": "^5.2 || ^6.0 || ^7.0"
63-
},
64-
"conflict": {
65-
"sebastian/comparator": ">=5.0"
61+
"phpstan/phpstan": "^2.1",
62+
"symfony/finder": "^5.4 || ^6.4 || ^7.0"
6663
},
6764
"bin": [
6865
"bin/schema"

0 commit comments

Comments
 (0)