Skip to content

Commit a421da1

Browse files
committed
PHPUnit 11
2 parents d9fe623 + e7032a2 commit a421da1

23 files changed

+1021
-1249
lines changed

.github/workflows/apiref.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535
uses: "shivammathur/setup-php@v2"
3636
with:
3737
coverage: "none"
38-
php-version: "8.1"
38+
php-version: "8.2"
3939

4040
- name: "Install dependencies"
4141
run: "composer install --no-interaction --no-progress"

.github/workflows/backward-compatibility.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
uses: "shivammathur/setup-php@v2"
3333
with:
3434
coverage: "none"
35-
php-version: "8.1"
35+
php-version: "8.2"
3636

3737
- name: "Install dependencies"
3838
run: "composer install --no-dev --no-interaction --no-progress"

.github/workflows/changelog-generator.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jobs:
3333
uses: "shivammathur/setup-php@v2"
3434
with:
3535
coverage: "none"
36-
php-version: "8.1"
36+
php-version: "8.2"
3737

3838
- name: "Install dependencies"
3939
run: "composer install --no-interaction --no-progress"

.github/workflows/e2e-tests.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,7 @@ jobs:
291291
uses: "shivammathur/setup-php@v2"
292292
with:
293293
coverage: "none"
294-
php-version: "8.1"
294+
php-version: "8.2"
295295
extensions: mbstring
296296
ini-values: memory_limit=256M
297297

@@ -401,7 +401,7 @@ jobs:
401401
uses: "shivammathur/setup-php@v2"
402402
with:
403403
coverage: "none"
404-
php-version: "8.1"
404+
php-version: "8.2"
405405
tools: ${{ matrix.tools }}
406406
extensions: ${{ matrix.extensions }}
407407

.github/workflows/lint.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,14 +40,14 @@ jobs:
4040
php-version: "${{ matrix.php-version }}"
4141

4242
- name: "Downgrade PHPUnit"
43-
if: matrix.php-version == '7.4' || matrix.php-version == '8.0'
43+
if: matrix.php-version == '7.4' || matrix.php-version == '8.0' || matrix.php-version == '8.1'
4444
run: "composer require --dev phpunit/phpunit:^9.6 sebastian/diff:^4.0 --update-with-dependencies --ignore-platform-reqs"
4545

4646
- name: "Install dependencies"
4747
run: "composer install --no-interaction --no-progress"
4848

4949
- name: "Transform source code"
50-
if: matrix.php-version == '7.4' || matrix.php-version == '8.0'
50+
if: matrix.php-version == '7.4' || matrix.php-version == '8.0' || matrix.php-version == '8.1'
5151
run: |
5252
composer install --no-interaction --no-progress --working-dir=compiler
5353
./compiler/vendor/bin/simple-downgrade downgrade -c build/downgrade.php ${{ matrix.php-version }}
@@ -73,7 +73,7 @@ jobs:
7373
uses: "shivammathur/setup-php@v2"
7474
with:
7575
coverage: "none"
76-
php-version: "8.1"
76+
php-version: "8.2"
7777

7878
- name: "Validate Composer"
7979
run: "composer validate"

.github/workflows/reflection-golden-test.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,6 @@ jobs:
6464
fail-fast: false
6565
matrix:
6666
php-version:
67-
- "8.1"
6867
- "8.2"
6968
- "8.3"
7069
- "8.4"

.github/workflows/static-analysis.yml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -49,15 +49,15 @@ jobs:
4949
extensions: mbstring
5050

5151
- name: "Downgrade PHPUnit"
52-
if: matrix.php-version == '7.4' || matrix.php-version == '8.0'
52+
if: matrix.php-version == '7.4' || matrix.php-version == '8.0' || matrix.php-version == '8.1'
5353
shell: bash
5454
run: "composer require --dev phpunit/phpunit:^9.6 sebastian/diff:^4.0 --update-with-dependencies --ignore-platform-reqs"
5555

5656
- name: "Install dependencies"
5757
run: "composer install --no-interaction --no-progress"
5858

5959
- name: "Transform source code"
60-
if: matrix.php-version == '7.4' || matrix.php-version == '8.0'
60+
if: matrix.php-version == '7.4' || matrix.php-version == '8.0' || matrix.php-version == '8.1'
6161
shell: bash
6262
run: |
6363
composer install --no-interaction --no-progress --working-dir=compiler
@@ -77,7 +77,6 @@ jobs:
7777
fail-fast: false
7878
matrix:
7979
php-version:
80-
- "8.1"
8180
- "8.2"
8281
- "8.3"
8382
- "8.4"
@@ -128,7 +127,7 @@ jobs:
128127
uses: "shivammathur/setup-php@v2"
129128
with:
130129
coverage: "none"
131-
php-version: "8.1"
130+
php-version: "8.2"
132131
ini-file: development
133132

134133
- name: "Install dependencies"
@@ -154,7 +153,7 @@ jobs:
154153
uses: "shivammathur/setup-php@v2"
155154
with:
156155
coverage: "none"
157-
php-version: "8.1"
156+
php-version: "8.2"
158157
ini-file: development
159158

160159
- name: "Install dependencies"

.github/workflows/tests-levels-matrix.php

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,25 @@
11
<?php declare(strict_types = 1);
22

3-
shell_exec('php vendor/bin/phpunit --list-tests-xml test-list.xml');
3+
shell_exec('php vendor/bin/phpunit --group levels --list-tests-xml test-list.xml');
44

55
$simpleXml = simplexml_load_file('test-list.xml');
66
if ($simpleXml === false) {
77
throw new RuntimeException('Error loading test-list.xml');
88
}
99

1010
$testFilters = [];
11-
foreach($simpleXml->testCaseClass as $testCaseClass) {
12-
foreach($testCaseClass->testCaseMethod as $testCaseMethod) {
13-
if ((string) $testCaseMethod['groups'] !== 'levels') {
14-
continue;
15-
}
16-
17-
$testCaseName = (string) $testCaseMethod['id'];
11+
foreach($simpleXml->tests as $testClasses) {
12+
foreach($testClasses->testClass as $testClass) {
13+
foreach($testClass->testMethod as $testMethod) {
14+
$testCaseName = (string)$testMethod['id'];
1815

19-
[$className, $testName] = explode('::', $testCaseName, 2);
20-
$fileName = 'tests/'. str_replace('\\', DIRECTORY_SEPARATOR, $className) . '.php';
16+
[$className, $testName] = explode('::', $testCaseName, 2);
17+
$fileName = 'tests/' . str_replace('\\', DIRECTORY_SEPARATOR, $className) . '.php';
2118

22-
$filter = str_replace('\\', '\\\\', $testCaseName);
19+
$filter = str_replace('\\', '\\\\', $testCaseName);
2320

24-
$testFilters[] = sprintf("%s --filter %s", escapeshellarg($fileName), escapeshellarg($filter));
21+
$testFilters[] = sprintf("%s --filter %s", escapeshellarg($fileName), escapeshellarg($filter));
22+
}
2523
}
2624
}
2725

.github/workflows/tests.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ jobs:
3232
fail-fast: false
3333
matrix:
3434
php-version:
35-
- "8.1"
3635
- "8.2"
3736
- "8.3"
3837
- "8.4"
@@ -76,7 +75,7 @@ jobs:
7675
uses: "shivammathur/setup-php@v2"
7776
with:
7877
coverage: "none"
79-
php-version: "8.1"
78+
php-version: "8.2"
8079
tools: pecl
8180
extensions: ds,mbstring
8281
ini-file: development
@@ -159,6 +158,7 @@ jobs:
159158
php-version:
160159
- "7.4"
161160
- "8.0"
161+
- "8.1"
162162
operating-system: [ ubuntu-latest, windows-latest ]
163163

164164
steps:

.github/workflows/update-phpstorm-stubs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
uses: "shivammathur/setup-php@v2"
2424
with:
2525
coverage: "none"
26-
php-version: "8.1"
26+
php-version: "8.2"
2727
- name: "Install dependencies"
2828
run: "composer install --no-interaction --no-progress"
2929
- name: "Checkout stubs"

build/ignore-by-php-version.neon.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
$includes[] = __DIR__ . '/deprecated-8.4.neon';
3434
}
3535

36-
if (PHP_VERSION_ID < 80100) {
36+
if (PHP_VERSION_ID < 80200) {
3737
$includes[] = __DIR__ . '/old-phpunit.neon';
3838
} else {
3939
$includes[] = __DIR__ . '/new-phpunit.neon';

compiler/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"require": {
77
"php": "^8.0",
88
"nette/neon": "^3.0.0",
9-
"ondrejmirtes/simple-downgrader": "^2.1.8",
9+
"ondrejmirtes/simple-downgrader": "^2.2.0",
1010
"seld/phar-utils": "^1.2",
1111
"symfony/console": "^5.4.43",
1212
"symfony/filesystem": "^5.4.43",

compiler/composer.lock

Lines changed: 7 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

composer.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"MIT"
66
],
77
"require": {
8-
"php": "^8.1",
8+
"php": "^8.2",
99
"composer-runtime-api": "^2.0",
1010
"clue/ndjson-react": "^1.0",
1111
"composer/ca-bundle": "^1.2",
@@ -38,7 +38,7 @@
3838
"react/promise": "^3.2",
3939
"react/socket": "^1.3",
4040
"react/stream": "^1.1",
41-
"sebastian/diff": "^5.0",
41+
"sebastian/diff": "^6.0.2",
4242
"symfony/console": "^5.4.3",
4343
"symfony/finder": "^5.4.3",
4444
"symfony/polyfill-intl-grapheme": "^1.23",
@@ -61,14 +61,14 @@
6161
"phpstan/phpstan-nette": "^2.0",
6262
"phpstan/phpstan-phpunit": "^2.0.7",
6363
"phpstan/phpstan-strict-rules": "^2.0",
64-
"phpunit/phpunit": "10.5.31",
64+
"phpunit/phpunit": "^11.5.23",
6565
"shipmonk/composer-dependency-analyser": "^1.5",
6666
"shipmonk/dead-code-detector": "^0.12.0",
6767
"shipmonk/name-collision-detector": "^2.0"
6868
},
6969
"config": {
7070
"platform": {
71-
"php": "8.1.99"
71+
"php": "8.2.99"
7272
},
7373
"platform-check": false,
7474
"sort-packages": true,

0 commit comments

Comments
 (0)