Skip to content

Commit 0b6a1a6

Browse files
committed
[Map] Drop Symfony PHPUnit Bridge in favor of PHPUnit >= 11.0
1 parent 18fbdf9 commit 0b6a1a6

22 files changed

+151
-97
lines changed

src/Map/.gitignore

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1-
vendor
2-
composer.lock
3-
.phpunit.result.cache
1+
/assets/node_modules/
2+
/vendor/
3+
/composer.lock
4+
/phpunit.xml
5+
/.phpunit.cache

src/Map/composer.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,11 @@
3838
"require-dev": {
3939
"symfony/asset-mapper": "^6.4|^7.0|^8.0",
4040
"symfony/framework-bundle": "^6.4|^7.0|^8.0",
41-
"symfony/phpunit-bridge": "^7.2|^8.0",
41+
"phpunit/phpunit": "^11.1|^12.0",
4242
"symfony/twig-bundle": "^6.4|^7.0|^8.0",
4343
"symfony/ux-twig-component": "^2.18|^8.0",
4444
"symfony/ux-icons": "^2.18",
45-
"spatie/phpunit-snapshot-assertions": "^4.2.17|^5.2.3",
46-
"phpunit/phpunit": "^9.6.22"
45+
"spatie/phpunit-snapshot-assertions": "^5.2.3"
4746
},
4847
"conflict": {
4948
"symfony/ux-twig-component": "<2.21"

src/Map/phpunit.xml.dist renamed to src/Map/phpunit.dist.xml

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,13 @@
22
<!-- https://phpunit.de/manual/current/en/appendixes.configuration.html -->
33
<phpunit
44
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
5-
xsi:noNamespaceSchemaLocation="vendor/bin/.phpunit/phpunit.xsd"
5+
xsi:noNamespaceSchemaLocation="vendor/phpunit/phpunit/phpunit.xsd"
66
colors="true"
7-
bootstrap="vendor/autoload.php"
7+
bootstrap="tests/bootstrap.php"
8+
failOnDeprecation="true"
89
failOnRisky="true"
910
failOnWarning="true"
11+
cacheDirectory=".phpunit.cache"
1012
>
1113
<php>
1214
<ini name="error_reporting" value="-1"/>
@@ -20,13 +22,18 @@
2022
</testsuite>
2123
</testsuites>
2224

23-
<coverage>
25+
<source
26+
ignoreSuppressionOfDeprecations="true"
27+
ignoreIndirectDeprecations="true"
28+
restrictNotices="true"
29+
restrictWarnings="true"
30+
>
2431
<include>
25-
<directory>./src</directory>
32+
<directory>src</directory>
2633
</include>
27-
</coverage>
2834

29-
<listeners>
30-
<listener class="Symfony\Bridge\PhpUnit\SymfonyTestsListener"/>
31-
</listeners>
35+
<deprecationTrigger>
36+
<function>trigger_deprecation</function>
37+
</deprecationTrigger>
38+
</source>
3239
</phpunit>
Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1-
vendor/
2-
composer.lock
3-
phpunit.xml
1+
/assets/node_modules/
2+
/vendor/
3+
/composer.lock
4+
/phpunit.xml
5+
/.phpunit.cache

src/Map/src/Bridge/Google/composer.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,9 @@
2121
"symfony/ux-map": "^2.19"
2222
},
2323
"require-dev": {
24-
"symfony/phpunit-bridge": "^7.2|^8.0",
24+
"phpunit/phpunit": "^11.1|^12.0",
2525
"symfony/ux-icons": "^2.18",
26-
"spatie/phpunit-snapshot-assertions": "^4.2.17|^5.2.3",
27-
"phpunit/phpunit": "^9.6.22"
26+
"spatie/phpunit-snapshot-assertions": "^5.2.3"
2827
},
2928
"autoload": {
3029
"psr-4": { "Symfony\\UX\\Map\\Bridge\\Google\\": "src/" },

src/Map/src/Bridge/Google/phpunit.xml.dist renamed to src/Map/src/Bridge/Google/phpunit.dist.xml

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,17 @@
22
<!-- https://phpunit.de/manual/current/en/appendixes.configuration.html -->
33
<phpunit
44
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
5-
xsi:noNamespaceSchemaLocation="vendor/bin/.phpunit/phpunit.xsd"
5+
xsi:noNamespaceSchemaLocation="vendor/phpunit/phpunit/phpunit.xsd"
66
colors="true"
7-
bootstrap="vendor/autoload.php"
7+
bootstrap="tests/bootstrap.php"
8+
failOnDeprecation="true"
89
failOnRisky="true"
910
failOnWarning="true"
11+
cacheDirectory=".phpunit.cache"
1012
>
1113
<php>
1214
<ini name="error_reporting" value="-1"/>
1315
<env name="SHELL_VERBOSITY" value="-1"/>
14-
<env name="SYMFONY_DEPRECATIONS_HELPER" value="max[self]=0&amp;max[direct]=0"/>
1516
</php>
1617

1718
<testsuites>
@@ -20,13 +21,18 @@
2021
</testsuite>
2122
</testsuites>
2223

23-
<coverage>
24+
<source
25+
ignoreSuppressionOfDeprecations="true"
26+
ignoreIndirectDeprecations="true"
27+
restrictNotices="true"
28+
restrictWarnings="true"
29+
>
2430
<include>
25-
<directory>./src</directory>
31+
<directory>src</directory>
2632
</include>
27-
</coverage>
2833

29-
<listeners>
30-
<listener class="Symfony\Bridge\PhpUnit\SymfonyTestsListener"/>
31-
</listeners>
34+
<deprecationTrigger>
35+
<function>trigger_deprecation</function>
36+
</deprecationTrigger>
37+
</source>
3238
</phpunit>
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<?php
2+
3+
/*
4+
* This file is part of the Symfony package.
5+
*
6+
* (c) Fabien Potencier <[email protected]>
7+
*
8+
* For the full copyright and license information, please view the LICENSE
9+
* file that was distributed with this source code.
10+
*/
11+
12+
use Symfony\Component\ErrorHandler\ErrorHandler;
13+
14+
require __DIR__.'/../vendor/autoload.php';
15+
16+
// @see https://github.com/symfony/symfony/issues/53812
17+
ErrorHandler::register(null, false);
Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1-
vendor/
2-
composer.lock
3-
phpunit.xml
1+
/assets/node_modules/
2+
/vendor/
3+
/composer.lock
4+
/phpunit.xml
5+
/.phpunit.cache

src/Map/src/Bridge/Leaflet/composer.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,9 @@
2121
"symfony/ux-map": "^2.19"
2222
},
2323
"require-dev": {
24-
"symfony/phpunit-bridge": "^7.2|^8.0",
24+
"phpunit/phpunit": "^11.1|^12.0",
2525
"symfony/ux-icons": "^2.18",
26-
"spatie/phpunit-snapshot-assertions": "^4.2.17|^5.2.3",
27-
"phpunit/phpunit": "^9.6.22"
26+
"spatie/phpunit-snapshot-assertions": "^5.2.3"
2827
},
2928
"autoload": {
3029
"psr-4": { "Symfony\\UX\\Map\\Bridge\\Leaflet\\": "src/" },

src/Map/src/Bridge/Leaflet/phpunit.xml.dist renamed to src/Map/src/Bridge/Leaflet/phpunit.dist.xml

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,17 @@
22
<!-- https://phpunit.de/manual/current/en/appendixes.configuration.html -->
33
<phpunit
44
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
5-
xsi:noNamespaceSchemaLocation="vendor/bin/.phpunit/phpunit.xsd"
5+
xsi:noNamespaceSchemaLocation="vendor/phpunit/phpunit/phpunit.xsd"
66
colors="true"
7-
bootstrap="vendor/autoload.php"
7+
bootstrap="tests/bootstrap.php"
8+
failOnDeprecation="true"
89
failOnRisky="true"
910
failOnWarning="true"
11+
cacheDirectory=".phpunit.cache"
1012
>
1113
<php>
1214
<ini name="error_reporting" value="-1"/>
1315
<env name="SHELL_VERBOSITY" value="-1"/>
14-
<env name="SYMFONY_DEPRECATIONS_HELPER" value="max[self]=0&amp;max[direct]=0"/>
1516
</php>
1617

1718
<testsuites>
@@ -20,13 +21,18 @@
2021
</testsuite>
2122
</testsuites>
2223

23-
<coverage>
24+
<source
25+
ignoreSuppressionOfDeprecations="true"
26+
ignoreIndirectDeprecations="true"
27+
restrictNotices="true"
28+
restrictWarnings="true"
29+
>
2430
<include>
25-
<directory>./src</directory>
31+
<directory>src</directory>
2632
</include>
27-
</coverage>
2833

29-
<listeners>
30-
<listener class="Symfony\Bridge\PhpUnit\SymfonyTestsListener"/>
31-
</listeners>
34+
<deprecationTrigger>
35+
<function>trigger_deprecation</function>
36+
</deprecationTrigger>
37+
</source>
3238
</phpunit>

0 commit comments

Comments
 (0)