Skip to content

Commit ce401b3

Browse files
authored
adds support for PHP 8.5 and symfony 8.0 (#511)
1 parent aca82f5 commit ce401b3

29 files changed

+1277
-5449
lines changed

.github/dependabot.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ updates:
1010
- "/tools/infection"
1111
- "/tools/phpbench"
1212
- "/tools/phpstan"
13-
- "/tools/psalm"
1413
- package-ecosystem: "github-actions"
1514
directory: "/"
1615
schedule:

.github/workflows/test-suite.yml

Lines changed: 31 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -10,33 +10,39 @@ on:
1010

1111
jobs:
1212
tests:
13-
name: "Tests"
14-
runs-on: ${{ matrix.operating-system }}
13+
name: "Tests ${{ matrix.php-version }} ${{ matrix.dependencies }} (Symfony ${{ matrix.symfony-version }})"
14+
runs-on: "ubuntu-latest"
1515
strategy:
16+
fail-fast: false
1617
matrix:
1718
dependencies:
18-
- "locked"
1919
- "lowest"
2020
- "highest"
2121
php-version:
22-
- "8.1"
23-
- "8.2"
2422
- "8.3"
2523
- "8.4"
26-
operating-system:
27-
- "ubuntu-latest"
24+
- "8.5"
25+
symfony-version:
26+
- "5.4.*"
27+
- "6.4.*"
28+
- "7.3.*"
29+
- "7.4.*"
30+
- "8.0.*"
31+
exclude:
32+
- php-version: 8.3
33+
symfony-version: "8.0.*"
2834

2935
steps:
3036
- name: "Checkout"
31-
uses: "actions/checkout@v4"
37+
uses: "actions/checkout@v6"
3238

3339
- name: "Install PHP"
3440
uses: "shivammathur/setup-php@v2"
3541
with:
3642
coverage: "pcov"
3743
php-version: "${{ matrix.php-version }}"
3844
ini-values: memory_limit=-1
39-
tools: composer:v2
45+
tools: flex, composer:v2
4046

4147
- name: "Get Composer Cache Directory"
4248
id: composer-cache
@@ -48,9 +54,12 @@ jobs:
4854
with:
4955
path: |
5056
${{ steps.composer-cache.outputs.dir }}
51-
key: "php-${{ matrix.php-version }}-${{ matrix.dependencies }}-composer-${{ hashFiles('**/composer.lock') }}"
57+
key: "php-${{ matrix.php-version }}-composer-${{ hashFiles('**/composer.json **/composer.lock') }}"
5258
restore-keys: |
53-
php-${{ matrix.php-version }}-${{ matrix.dependencies }}-composer-
59+
php-${{ matrix.php-version }}-composer-
60+
61+
- name: "Configure Symfony"
62+
run: composer config extra.symfony.require "${{ matrix.symfony-version }}"
5463

5564
- name: "Install lowest dependencies"
5665
if: ${{ matrix.dependencies == 'lowest' }}
@@ -60,10 +69,6 @@ jobs:
6069
if: ${{ matrix.dependencies == 'highest' }}
6170
run: "composer update --no-interaction --no-progress --no-suggest"
6271

63-
- name: "Install locked dependencies"
64-
if: ${{ matrix.dependencies == 'locked' }}
65-
run: "composer install --no-interaction --no-progress --no-suggest"
66-
6772
- name: "Tests"
6873
run: "composer test"
6974

@@ -72,13 +77,13 @@ jobs:
7277
runs-on: "ubuntu-latest"
7378
steps:
7479
- name: "Checkout"
75-
uses: "actions/checkout@v4"
80+
uses: "actions/checkout@v6"
7681

7782
- name: "Install PHP"
7883
uses: "shivammathur/setup-php@v2"
7984
with:
80-
coverage: "pcov"
81-
php-version: "8.1"
85+
coverage: none
86+
php-version: "8.3"
8287
ini-values: memory_limit=-1
8388
tools: composer:v2
8489

@@ -92,11 +97,11 @@ jobs:
9297
with:
9398
path: |
9499
${{ steps.composer-cache.outputs.dir }}
95-
key: "php-8.1-locked-composer-${{ hashFiles('**/composer.lock') }}"
100+
key: "php-8.3-composer-${{ hashFiles('**/composer.json **/composer.lock') }}"
96101
restore-keys: |
97-
php-8.1-locked-composer-
102+
php-8.3-composer-
98103
99-
- name: "Install locked dependencies"
104+
- name: "Install dependencies"
100105
run: "composer install --no-interaction --no-progress --no-suggest"
101106

102107
- name: "Static Analyze"
@@ -107,14 +112,14 @@ jobs:
107112
runs-on: "ubuntu-latest"
108113
steps:
109114
- name: "Checkout"
110-
uses: "actions/checkout@v4"
115+
uses: "actions/checkout@v6"
111116

112117
- name: "Install PHP"
113118
uses: "shivammathur/setup-php@v2"
114119
with:
115120
coverage: "pcov"
116121
tools: composer:v2
117-
php-version: "8.1"
122+
php-version: "8.3"
118123
ini-values: memory_limit=-1
119124

120125
- name: "Get Composer Cache Directory"
@@ -127,11 +132,11 @@ jobs:
127132
with:
128133
path: |
129134
${{ steps.composer-cache.outputs.dir }}
130-
key: "php-8.1-locked-composer-${{ hashFiles('**/composer.lock') }}"
135+
key: "php-8.3-composer-${{ hashFiles('**/composer.json **/composer.lock') }}"
131136
restore-keys: |
132-
php-8.1-locked-composer-
137+
php-8.3-composer-
133138
134-
- name: "Install locked dependencies"
139+
- name: "Install dependencies"
135140
run: "composer install --no-interaction --no-progress --no-suggest"
136141

137142
- name: "Mutation Tests"

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@ var/
44
.DS_Store
55
.idea
66
.phpunit.cache/
7+
composer.lock

composer.json

Lines changed: 7 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
}
1616
],
1717
"require": {
18-
"php": "~8.1 || ~8.2 || ~8.3 || ~8.4",
18+
"php": "~8.3 || ~8.4 || ~8.5",
1919
"ext-filter": "*",
2020
"ext-json": "*",
2121
"ext-simplexml": "*",
@@ -24,12 +24,9 @@
2424
"doctrine/lexer": "^3.0"
2525
},
2626
"require-dev": {
27-
"phpunit/phpunit": "^10.4",
27+
"phpunit/phpunit": "^10.5",
2828
"openlss/lib-array2xml": "^1.0",
29-
"symfony/expression-language": "^5.4|^6.4|^7.0",
30-
"symfony/cache": "^5.4|^6.4",
31-
"nikic/php-parser": "^4.0",
32-
"symfony/var-exporter": "^5.4|^6.4|^7.0"
29+
"symfony/expression-language": "^5.4 || ^6.4 || ^7.3 || ^8.0"
3330
},
3431
"suggest": {
3532
"openlss/lib-array2xml": "In order ot use Coduo\\PHPMatcher\\Matcher\\XmlMatcher",
@@ -47,10 +44,7 @@
4744
}
4845
},
4946
"config": {
50-
"sort-packages": true,
51-
"platform": {
52-
"php": "8.1"
53-
}
47+
"sort-packages": true
5448
},
5549
"scripts": {
5650
"benchmark": [
@@ -70,26 +64,23 @@
7064
],
7165
"test:mutation": [
7266
"Composer\\Config::disableProcessTimeout",
73-
"tools\/infection\/vendor\/bin\/infection -j2"
67+
"tools\/infection\/vendor\/bin\/infection --threads=4"
7468
],
7569
"static:analyze": [
7670
"tools\/cs-fixer\/vendor\/bin\/php-cs-fixer fix --dry-run",
77-
"tools\/psalm\/vendor\/bin\/psalm --shepherd --stats",
7871
"tools\/phpstan\/vendor\/bin\/phpstan analyze -c phpstan.neon"
7972
],
8073
"tools:install": [
8174
"composer install --working-dir=./tools/cs-fixer",
8275
"composer install --working-dir=./tools/infection",
8376
"composer install --working-dir=./tools/phpbench",
84-
"composer install --working-dir=./tools/phpstan",
85-
"composer install --working-dir=./tools/psalm --ignore-platform-req=php"
77+
"composer install --working-dir=./tools/phpstan"
8678
],
8779
"tools:update": [
8880
"composer update --working-dir=./tools/cs-fixer",
8981
"composer update --working-dir=./tools/infection",
9082
"composer update --working-dir=./tools/phpbench",
91-
"composer update --working-dir=./tools/phpstan",
92-
"composer update --working-dir=./tools/psalm --ignore-platform-req=php"
83+
"composer update --working-dir=./tools/phpstan"
9384
],
9485
"post-install-cmd": [
9586
"@tools:install"

0 commit comments

Comments
 (0)