Skip to content

Commit c0886c1

Browse files
committed
chore: allow phpunit ^11.5 for PHP 8.2 compatibility
PHPUnit 12 requires PHP 8.3+. Widen the constraint in the root and each component composer.json so PHP 8.2 resolves to 11.5 (LTS) and 8.3+ to 12.x. Removes the per-job "Force PHPUnit 11.5" workaround steps from CI. | Q | A | ------------- | --- | Branch? | 4.3 | Tickets | ∅ | License | MIT | Doc PR | ∅
1 parent c85ca3b commit c0886c1

23 files changed

Lines changed: 22 additions & 37 deletions

File tree

.github/workflows/ci.yml

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -276,9 +276,6 @@ jobs:
276276
composer global require soyuka/pmu
277277
composer global config allow-plugins.soyuka/pmu true --no-interaction
278278
composer global link .
279-
- name: Force PHPUnit 11.5 for PHP 8.2
280-
if: matrix.php == '8.2'
281-
run: composer require phpunit/phpunit:^11.5 --dev --with-all-dependencies
282279
- name: Clear test app cache
283280
run: tests/Fixtures/app/console cache:clear --ansi
284281
- name: Run PHPUnit tests
@@ -353,11 +350,6 @@ jobs:
353350
run: |
354351
composer global require soyuka/pmu
355352
composer global config allow-plugins.soyuka/pmu true --no-interaction
356-
- name: Force PHPUnit 11.5 for PHP 8.2
357-
if: matrix.php.version == '8.2'
358-
run: |
359-
cd $(composer ${{matrix.component}} --cwd)
360-
composer require phpunit/phpunit:^11.5 --dev --with-all-dependencies
361353
- name: Linking
362354
if: ${{ !matrix.php.lowest && !matrix.php.minimal-changes }}
363355
run: |
@@ -495,9 +487,6 @@ jobs:
495487
composer global require soyuka/pmu
496488
composer global config allow-plugins.soyuka/pmu true --no-interaction
497489
composer global link .
498-
- name: Force PHPUnit 11.5 for PHP 8.2
499-
if: matrix.php == '8.2'
500-
run: composer require phpunit/phpunit:^11.5 --dev --with-all-dependencies
501490
- name: Clear test app cache
502491
run: tests/Fixtures/app/console cache:clear --ansi
503492
- name: Resolve shard paths
@@ -1420,10 +1409,6 @@ jobs:
14201409
tools: pecl, composer
14211410
extensions: intl, bcmath, curl, openssl, mbstring, pdo_sqlite
14221411
ini-values: memory_limit=-1
1423-
- name: Force PHPUnit 11.5 for PHP 8.2
1424-
if: matrix.php == '8.2'
1425-
working-directory: 'src/Laravel'
1426-
run: composer require phpunit/phpunit:^11.5 --dev --with-all-dependencies
14271412
- name: Update project dependencies
14281413
run: |
14291414
composer global require soyuka/pmu

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@
156156
"phpstan/phpstan-doctrine": "^2.0",
157157
"phpstan/phpstan-phpunit": "^2.0",
158158
"phpstan/phpstan-symfony": "^2.0",
159-
"phpunit/phpunit": "^12.2",
159+
"phpunit/phpunit": "^11.5 || ^12.2",
160160
"psr/log": "^1.0 || ^2.0 || ^3.0",
161161
"ramsey/uuid": "^4.7",
162162
"ramsey/uuid-doctrine": "^2.0",

src/Doctrine/Common/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
"doctrine/mongodb-odm": "^2.10",
3535
"doctrine/orm": "^2.17 || ^3.0",
3636
"phpspec/prophecy-phpunit": "^2.2",
37-
"phpunit/phpunit": "^12.2",
37+
"phpunit/phpunit": "^11.5 || ^12.2",
3838
"symfony/type-info": "^7.3 || ^8.0"
3939
},
4040
"conflict": {

src/Doctrine/Odm/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
"doctrine/doctrine-bundle": "^2.11 || ^3.1",
3838
"doctrine/mongodb-odm-bundle": "^5.0",
3939
"phpspec/prophecy-phpunit": "^2.2",
40-
"phpunit/phpunit": "^12.2",
40+
"phpunit/phpunit": "^11.5 || ^12.2",
4141
"symfony/cache": "^6.4 || ^7.0 || ^8.0",
4242
"symfony/framework-bundle": "^6.4 || ^7.0 || ^8.0",
4343
"symfony/property-access": "^6.4 || ^7.0 || ^8.0",

src/Doctrine/Orm/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
"require-dev": {
3535
"doctrine/doctrine-bundle": "^2.11 || ^3.1",
3636
"phpspec/prophecy-phpunit": "^2.2",
37-
"phpunit/phpunit": "^12.2",
37+
"phpunit/phpunit": "^11.5 || ^12.2",
3838
"ramsey/uuid": "^4.7",
3939
"ramsey/uuid-doctrine": "^2.0",
4040
"symfony/cache": "^6.4 || ^7.0 || ^8.0",

src/Documentation/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
}
4040
},
4141
"require-dev": {
42-
"phpunit/phpunit": "^12.2"
42+
"phpunit/phpunit": "^11.5 || ^12.2"
4343
},
4444
"minimum-stability": "beta",
4545
"prefer-stable": true

src/Elasticsearch/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
},
4242
"require-dev": {
4343
"phpspec/prophecy-phpunit": "^2.2",
44-
"phpunit/phpunit": "^12.2"
44+
"phpunit/phpunit": "^11.5 || ^12.2"
4545
},
4646
"autoload": {
4747
"psr-4": {

src/GraphQl/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
"twig/twig": "^1.42.3 || ^2.12 || ^3.0",
3737
"symfony/mercure-bundle": "*",
3838
"symfony/routing": "^6.4 || ^7.0 || ^8.0",
39-
"phpunit/phpunit": "^12.2"
39+
"phpunit/phpunit": "^11.5 || ^12.2"
4040
},
4141
"autoload": {
4242
"psr-4": {

src/Hal/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@
6565
"test": "./vendor/bin/phpunit"
6666
},
6767
"require-dev": {
68-
"phpunit/phpunit": "^12.2",
68+
"phpunit/phpunit": "^11.5 || ^12.2",
6969
"api-platform/json-schema": "^4.3"
7070
},
7171
"minimum-stability": "beta",

src/HttpCache/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
"phpspec/prophecy-phpunit": "^2.2",
3434
"symfony/http-client": "^6.4 || ^7.0 || ^8.0",
3535
"symfony/type-info": "^7.3 || ^8.0",
36-
"phpunit/phpunit": "^12.2"
36+
"phpunit/phpunit": "^11.5 || ^12.2"
3737
},
3838
"autoload": {
3939
"psr-4": {

0 commit comments

Comments
 (0)