Skip to content

Commit b5cba0a

Browse files
authored
ci: patch phpunit deprecations inside component (#7103)
1 parent 108d92d commit b5cba0a

37 files changed

+190
-145
lines changed

.github/patches/phpunit.patch

-77
This file was deleted.

.github/workflows/ci.yml

+9-11
Original file line numberDiff line numberDiff line change
@@ -264,15 +264,14 @@ jobs:
264264
continue-on-error: true
265265

266266
phpunit-components:
267-
name: PHPUnit ${{ matrix.component }} (PHP ${{ matrix.php.version }} ${{ matrix.php.deprecations && 'no deprecations' || '' }})
267+
name: PHPUnit ${{ matrix.component }} (PHP ${{ matrix.php.version }} ${{ matrix.php.coverage && 'coverage' || '' }}${{ matrix.php.deprecations && 'no deprecations' || '' }})
268268
runs-on: ubuntu-latest
269269
timeout-minutes: 20
270270
strategy:
271271
matrix:
272272
php:
273273
- version: '8.2'
274274
- version: '8.3'
275-
- version: '8.4'
276275
- version: '8.4'
277276
coverage: true
278277
- version: '8.4'
@@ -305,18 +304,19 @@ jobs:
305304
tools: pecl, composer
306305
extensions: intl, bcmath, curl, openssl, mbstring, pdo_sqlite, mongodb
307306
ini-values: memory_limit=-1
308-
- name: Allow unstable project dependencies
309-
if: matrix.php.deprecations == true
310-
run: composer config minimum-stability dev
311-
- name: Run ${{ matrix.component }} install
307+
- name: Linking
312308
run: |
313309
composer global require soyuka/pmu
314310
composer global config allow-plugins.soyuka/pmu true --no-interaction
315311
composer global link . --permanent
316-
composer ${{matrix.component}} update
317-
- name: Patch phpunit
312+
- name: Allow unstable project dependencies
318313
if: matrix.php.deprecations == true
319-
run: git apply --directory vendor/phpunit/phpunit .github/patches/phpunit.patch
314+
run: |
315+
cd $(composer ${{matrix.component}} --cwd)
316+
composer config minimum-stability dev
317+
- name: Run ${{ matrix.component }} install
318+
run: |
319+
composer ${{matrix.component}} update
320320
- name: Run ${{ matrix.component }} tests
321321
run: |
322322
mkdir -p /tmp/build/logs/phpunit
@@ -867,8 +867,6 @@ jobs:
867867
composer global link .
868868
- name: Clear test app cache
869869
run: tests/Fixtures/app/console cache:clear --ansi
870-
- name: Patch phpunit
871-
run: git apply --directory vendor/phpunit/phpunit .github/patches/phpunit.patch
872870
- name: Run PHPUnit tests
873871
run: vendor/bin/phpunit --fail-on-deprecation --display-deprecations
874872

composer.json

+7-3
Original file line numberDiff line numberDiff line change
@@ -150,12 +150,12 @@
150150
"phpstan/phpstan-doctrine": "^1.0",
151151
"phpstan/phpstan-phpunit": "^1.0",
152152
"phpstan/phpstan-symfony": "^1.0",
153-
"phpunit/phpunit": "^11.2",
153+
"phpunit/phpunit": "11.5.x-dev",
154154
"psr/log": "^1.0 || ^2.0 || ^3.0",
155155
"ramsey/uuid": "^4.7",
156156
"ramsey/uuid-doctrine": "^2.0",
157157
"soyuka/contexts": "^3.3.10",
158-
"soyuka/pmu": "^0.0.15",
158+
"soyuka/pmu": "^0.1.0",
159159
"soyuka/stubs-mongodb": "^1.0",
160160
"symfony/asset": "^6.4 || ^7.0",
161161
"symfony/browser-kit": "^6.4 || ^7.0",
@@ -208,5 +208,9 @@
208208
"symfony/web-profiler-bundle": "To use the data collector.",
209209
"webonyx/graphql-php": "To support GraphQL."
210210
},
211-
"type": "library"
211+
"type": "library",
212+
"repositories": [
213+
{"type": "vcs", "url": "https://github.com/soyuka/phpunit"}
214+
],
215+
"minimum-stability": "dev"
212216
}

src/Doctrine/Common/composer.json

+8-2
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": "^11.2"
37+
"phpunit/phpunit": "11.5.x-dev"
3838
},
3939
"conflict": {
4040
"doctrine/persistence": "<1.3"
@@ -73,5 +73,11 @@
7373
},
7474
"scripts": {
7575
"test": "./vendor/bin/phpunit"
76-
}
76+
},
77+
"repositories": [
78+
{
79+
"type": "vcs",
80+
"url": "https://github.com/soyuka/phpunit"
81+
}
82+
]
7783
}

src/Doctrine/Odm/composer.json

+8-2
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
"doctrine/doctrine-bundle": "^2.11",
3636
"doctrine/mongodb-odm-bundle": "^5.0",
3737
"phpspec/prophecy-phpunit": "^2.2",
38-
"phpunit/phpunit": "^11.2",
38+
"phpunit/phpunit": "11.5.x-dev",
3939
"symfony/cache": "^6.4 || ^7.0",
4040
"symfony/framework-bundle": "^6.4 || ^7.0",
4141
"symfony/property-access": "^6.4 || ^7.0",
@@ -73,5 +73,11 @@
7373
},
7474
"scripts": {
7575
"test": "./vendor/bin/phpunit"
76-
}
76+
},
77+
"repositories": [
78+
{
79+
"type": "vcs",
80+
"url": "https://github.com/soyuka/phpunit"
81+
}
82+
]
7783
}

src/Doctrine/Orm/composer.json

+8-2
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
"require-dev": {
3434
"doctrine/doctrine-bundle": "^2.11",
3535
"phpspec/prophecy-phpunit": "^2.2",
36-
"phpunit/phpunit": "^11.2",
36+
"phpunit/phpunit": "11.5.x-dev",
3737
"ramsey/uuid": "^4.7",
3838
"ramsey/uuid-doctrine": "^2.0",
3939
"symfony/cache": "^6.4 || ^7.0",
@@ -73,5 +73,11 @@
7373
},
7474
"scripts": {
7575
"test": "./vendor/bin/phpunit"
76-
}
76+
},
77+
"repositories": [
78+
{
79+
"type": "vcs",
80+
"url": "https://github.com/soyuka/phpunit"
81+
}
82+
]
7783
}

src/Documentation/composer.json

+8-2
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,12 @@
3737
}
3838
},
3939
"require-dev": {
40-
"phpunit/phpunit": "^11.2"
41-
}
40+
"phpunit/phpunit": "11.5.x-dev"
41+
},
42+
"repositories": [
43+
{
44+
"type": "vcs",
45+
"url": "https://github.com/soyuka/phpunit"
46+
}
47+
]
4248
}

src/Elasticsearch/composer.json

+8-2
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
},
3838
"require-dev": {
3939
"phpspec/prophecy-phpunit": "^2.2",
40-
"phpunit/phpunit": "^11.2"
40+
"phpunit/phpunit": "11.5.x-dev"
4141
},
4242
"autoload": {
4343
"psr-4": {
@@ -73,5 +73,11 @@
7373
},
7474
"scripts": {
7575
"test": "./vendor/bin/phpunit"
76-
}
76+
},
77+
"repositories": [
78+
{
79+
"type": "vcs",
80+
"url": "https://github.com/soyuka/phpunit"
81+
}
82+
]
7783
}

src/Elasticsearch/phpunit.xml.dist

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
<directory>./Tests/</directory>
99
</testsuite>
1010
</testsuites>
11-
<source>
11+
<source ignoreSuppressionOfDeprecations="true" ignoreIndirectDeprecations="false" >
1212
<deprecationTrigger>
1313
<function>trigger_deprecation</function>
1414
</deprecationTrigger>

src/GraphQl/composer.json

+8-2
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
"twig/twig": "^1.42.3 || ^2.12 || ^3.0",
3636
"symfony/mercure-bundle": "*",
3737
"symfony/routing": "^6.4 || ^7.0",
38-
"phpunit/phpunit": "^11.2"
38+
"phpunit/phpunit": "11.5.x-dev"
3939
},
4040
"autoload": {
4141
"psr-4": {
@@ -76,5 +76,11 @@
7676
},
7777
"scripts": {
7878
"test": "./vendor/bin/phpunit"
79-
}
79+
},
80+
"repositories": [
81+
{
82+
"type": "vcs",
83+
"url": "https://github.com/soyuka/phpunit"
84+
}
85+
]
8086
}

src/GraphQl/phpunit.xml.dist

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
<directory>./Tests/</directory>
99
</testsuite>
1010
</testsuites>
11-
<source>
11+
<source ignoreSuppressionOfDeprecations="true" ignoreIndirectDeprecations="false" >
1212
<deprecationTrigger>
1313
<function>trigger_deprecation</function>
1414
</deprecationTrigger>

src/Hal/composer.json

+8-2
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,12 @@
6161
"test": "./vendor/bin/phpunit"
6262
},
6363
"require-dev": {
64-
"phpunit/phpunit": "^11.2"
65-
}
64+
"phpunit/phpunit": "11.5.x-dev"
65+
},
66+
"repositories": [
67+
{
68+
"type": "vcs",
69+
"url": "https://github.com/soyuka/phpunit"
70+
}
71+
]
6672
}

src/HttpCache/composer.json

+8-2
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
"symfony/dependency-injection": "^6.4 || ^7.0",
3333
"phpspec/prophecy-phpunit": "^2.2",
3434
"symfony/http-client": "^6.4 || ^7.0",
35-
"phpunit/phpunit": "^11.2"
35+
"phpunit/phpunit": "11.5.x-dev"
3636
},
3737
"autoload": {
3838
"psr-4": {
@@ -67,5 +67,11 @@
6767
},
6868
"scripts": {
6969
"test": "./vendor/bin/phpunit"
70-
}
70+
},
71+
"repositories": [
72+
{
73+
"type": "vcs",
74+
"url": "https://github.com/soyuka/phpunit"
75+
}
76+
]
7177
}

src/HttpCache/phpunit.xml.dist

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
<directory>./Tests/</directory>
99
</testsuite>
1010
</testsuites>
11-
<source>
11+
<source ignoreSuppressionOfDeprecations="true" ignoreIndirectDeprecations="false" >
1212
<deprecationTrigger>
1313
<function>trigger_deprecation</function>
1414
</deprecationTrigger>

src/Hydra/composer.json

+8-2
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
"api-platform/doctrine-common": "^4.1",
4040
"phpspec/prophecy": "^1.19",
4141
"phpspec/prophecy-phpunit": "^2.2",
42-
"phpunit/phpunit": "^11.2"
42+
"phpunit/phpunit": "11.5.x-dev"
4343
},
4444
"autoload": {
4545
"psr-4": {
@@ -74,5 +74,11 @@
7474
},
7575
"scripts": {
7676
"test": "./vendor/bin/phpunit"
77-
}
77+
},
78+
"repositories": [
79+
{
80+
"type": "vcs",
81+
"url": "https://github.com/soyuka/phpunit"
82+
}
83+
]
7884
}

src/Hydra/phpunit.xml.dist

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
<directory>./Tests/</directory>
99
</testsuite>
1010
</testsuites>
11-
<source>
11+
<source ignoreSuppressionOfDeprecations="true" ignoreIndirectDeprecations="false" >
1212
<deprecationTrigger>
1313
<function>trigger_deprecation</function>
1414
</deprecationTrigger>

src/JsonApi/composer.json

+8-2
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
"require-dev": {
3434
"phpspec/prophecy": "^1.19",
3535
"phpspec/prophecy-phpunit": "^2.2",
36-
"phpunit/phpunit": "^11.2"
36+
"phpunit/phpunit": "11.5.x-dev"
3737
},
3838
"autoload": {
3939
"psr-4": {
@@ -68,5 +68,11 @@
6868
},
6969
"scripts": {
7070
"test": "./vendor/bin/phpunit"
71-
}
71+
},
72+
"repositories": [
73+
{
74+
"type": "vcs",
75+
"url": "https://github.com/soyuka/phpunit"
76+
}
77+
]
7278
}

0 commit comments

Comments
 (0)