Skip to content

Commit 8aa6585

Browse files
committed
Drop Symfony PHPUnit bridge for PHPUnit
1 parent ab44abf commit 8aa6585

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+340
-324
lines changed

.github/workflows/test-turbo.yml

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,6 @@ jobs:
2828
with:
2929
working-directory: src/Turbo
3030

31-
- name: Install PHPUnit dependencies
32-
working-directory: src/Turbo
33-
run: vendor/bin/simple-phpunit --version
34-
3531
- name: PHPStan
3632
working-directory: src/Turbo
3733
run: vendor/bin/phpstan analyse --no-progress
@@ -93,8 +89,4 @@ jobs:
9389

9490
- name: Run tests
9591
working-directory: src/Turbo
96-
run: |
97-
[ 'lowest' = '${{ matrix.dependency-version }}' ] && export SYMFONY_DEPRECATIONS_HELPER=weak
98-
vendor/bin/simple-phpunit
99-
env:
100-
SYMFONY_DEPRECATIONS_HELPER: 'max[self]=1'
92+
run: vendor/bin/phpunit

.github/workflows/test.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ jobs:
124124

125125
- name: ${{ matrix.component }} Tests
126126
working-directory: "src/${{ matrix.component }}"
127-
run: vendor/bin/simple-phpunit
127+
run: vendor/bin/phpunit
128128

129129
tests-js:
130130
runs-on: ubuntu-latest

src/Autocomplete/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,11 @@
3737
"doctrine/orm": "^2.9.4|^3.0",
3838
"fakerphp/faker": "^1.22",
3939
"mtdowling/jmespath.php": "^2.6",
40+
"phpunit/phpunit": "^10.5",
4041
"symfony/form": "^6.3|^7.0",
4142
"symfony/options-resolver": "^6.3|^7.0",
4243
"symfony/framework-bundle": "^6.3|^7.0",
4344
"symfony/maker-bundle": "^1.40",
44-
"symfony/phpunit-bridge": "^6.3|^7.0",
4545
"symfony/process": "^6.3|^7.0",
4646
"symfony/security-bundle": "^6.3|^7.0",
4747
"symfony/twig-bundle": "^6.3|^7.0",

src/Autocomplete/phpunit.xml.dist

Lines changed: 16 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,20 @@
1-
<?xml version="1.0" encoding="UTF-8"?>
2-
1+
<?xml version="1.0" encoding="UTF-8" ?>
32
<!-- https://phpunit.de/manual/current/en/appendixes.configuration.html -->
4-
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
5-
xsi:noNamespaceSchemaLocation="vendor/bin/.phpunit/phpunit.xsd"
6-
colors="true"
7-
bootstrap="vendor/autoload.php"
8-
failOnRisky="true"
9-
failOnWarning="true"
3+
<phpunit
4+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
5+
xsi:noNamespaceSchemaLocation="vendor/phpunit/phpunit/phpunit.xsd"
6+
colors="true"
7+
bootstrap="vendor/autoload.php"
8+
failOnRisky="true"
9+
failOnWarning="true"
10+
displayDetailsOnTestsThatTriggerWarnings="true"
1011
>
1112
<php>
1213
<ini name="error_reporting" value="-1" />
1314
<server name="KERNEL_CLASS" value="Symfony\UX\Autocomplete\Tests\Fixtures\Kernel" />
1415
<server name="DATABASE_URL" value="sqlite:///%kernel.project_dir%/var/data.db" />
15-
<env name="SHELL_VERBOSITY" value="-1"/>
16-
<server name="SYMFONY_DEPRECATIONS_HELPER" value="max[self]=0&amp;max[direct]=0"/>
16+
<env name="SHELL_VERBOSITY" value="-1" />
17+
<server name="SYMFONY_DEPRECATIONS_HELPER" value="max[self]=0&amp;max[direct]=0" />
1718
</php>
1819

1920
<testsuites>
@@ -22,13 +23,9 @@
2223
</testsuite>
2324
</testsuites>
2425

25-
<filter>
26-
<whitelist processUncoveredFilesFromWhitelist="true">
27-
<directory suffix=".php">./src</directory>
28-
</whitelist>
29-
</filter>
30-
31-
<listeners>
32-
<listener class="Symfony\Bridge\PhpUnit\SymfonyTestsListener"/>
33-
</listeners>
26+
<source>
27+
<include>
28+
<directory>./src</directory>
29+
</include>
30+
</source>
3431
</phpunit>

src/Chartjs/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
},
3737
"require-dev": {
3838
"symfony/framework-bundle": "^5.4|^6.0|^7.0",
39-
"symfony/phpunit-bridge": "^5.4|^6.0|^7.0",
39+
"phpunit/phpunit": "^10.5",
4040
"symfony/twig-bundle": "^5.4|^6.0|^7.0",
4141
"symfony/var-dumper": "^5.4|^6.0|^7.0"
4242
},

src/Chartjs/phpunit.xml.dist

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,22 @@
1-
<?xml version="1.0" encoding="UTF-8"?>
2-
1+
<?xml version="1.0" encoding="UTF-8" ?>
32
<!-- https://phpunit.de/manual/current/en/appendixes.configuration.html -->
4-
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
5-
xsi:noNamespaceSchemaLocation="http://schema.phpunit.de/6.1/phpunit.xsd"
6-
backupGlobals="false"
7-
colors="true"
8-
bootstrap="vendor/autoload.php"
9-
failOnRisky="true"
10-
failOnWarning="true">
3+
<phpunit
4+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
5+
xsi:noNamespaceSchemaLocation="vendor/phpunit/phpunit/phpunit.xsd"
6+
backupGlobals="false"
7+
colors="true"
8+
bootstrap="vendor/autoload.php"
9+
failOnRisky="true"
10+
failOnWarning="true"
11+
displayDetailsOnTestsThatTriggerWarnings="true"
12+
>
1113
<php>
1214
<ini name="error_reporting" value="-1" />
1315
<ini name="intl.default_locale" value="en" />
1416
<ini name="intl.error_level" value="0" />
1517
<ini name="memory_limit" value="-1" />
1618
<env name="SHELL_VERBOSITY" value="-1" />
17-
<server name="SYMFONY_DEPRECATIONS_HELPER" value="max[self]=0&amp;max[direct]=0"/>
19+
<server name="SYMFONY_DEPRECATIONS_HELPER" value="max[self]=0&amp;max[direct]=0" />
1820
</php>
1921

2022
<testsuites>
@@ -23,9 +25,9 @@
2325
</testsuite>
2426
</testsuites>
2527

26-
<filter>
27-
<whitelist>
28+
<source>
29+
<include>
2830
<directory>./src</directory>
29-
</whitelist>
30-
</filter>
31+
</include>
32+
</source>
3133
</phpunit>

src/Cropperjs/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
"require-dev": {
4141
"symfony/expression-language": "^5.4|^6.0|^7.0",
4242
"symfony/framework-bundle": "^5.4|^6.0|^7.0",
43-
"symfony/phpunit-bridge": "^5.4|^6.0|^7.0",
43+
"phpunit/phpunit": "^10.5",
4444
"symfony/twig-bundle": "^5.4|^6.0|^7.0",
4545
"symfony/var-dumper": "^5.4|^6.0|^7.0",
4646
"twig/twig": "^2.14.7|^3.0.4"

src/Cropperjs/phpunit.xml.dist

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,22 @@
1-
<?xml version="1.0" encoding="UTF-8"?>
2-
1+
<?xml version="1.0" encoding="UTF-8" ?>
32
<!-- https://phpunit.de/manual/current/en/appendixes.configuration.html -->
4-
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
5-
xsi:noNamespaceSchemaLocation="http://schema.phpunit.de/6.1/phpunit.xsd"
6-
backupGlobals="false"
7-
colors="true"
8-
bootstrap="vendor/autoload.php"
9-
failOnRisky="true"
10-
failOnWarning="true">
3+
<phpunit
4+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
5+
xsi:noNamespaceSchemaLocation="vendor/phpunit/phpunit/phpunit.xsd"
6+
backupGlobals="false"
7+
colors="true"
8+
bootstrap="vendor/autoload.php"
9+
failOnRisky="true"
10+
failOnWarning="true"
11+
displayDetailsOnTestsThatTriggerWarnings="true"
12+
>
1113
<php>
1214
<ini name="error_reporting" value="-1" />
1315
<ini name="intl.default_locale" value="en" />
1416
<ini name="intl.error_level" value="0" />
1517
<ini name="memory_limit" value="-1" />
1618
<env name="SHELL_VERBOSITY" value="-1" />
17-
<server name="SYMFONY_DEPRECATIONS_HELPER" value="max[self]=0&amp;max[direct]=0"/>
19+
<server name="SYMFONY_DEPRECATIONS_HELPER" value="max[self]=0&amp;max[direct]=0" />
1820
</php>
1921

2022
<testsuites>
@@ -23,9 +25,9 @@
2325
</testsuite>
2426
</testsuites>
2527

26-
<filter>
27-
<whitelist>
28+
<source>
29+
<include>
2830
<directory>./src</directory>
29-
</whitelist>
30-
</filter>
31+
</include>
32+
</source>
3133
</phpunit>

src/Dropzone/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
},
3838
"require-dev": {
3939
"symfony/framework-bundle": "^5.4|^6.0|^7.0",
40-
"symfony/phpunit-bridge": "^5.4|^6.0|^7.0",
40+
"phpunit/phpunit": "^10.5",
4141
"symfony/twig-bundle": "^5.4|^6.0|^7.0",
4242
"symfony/var-dumper": "^5.4|^6.0|^7.0",
4343
"twig/twig": "^2.14.7|^3.0.4"

src/Dropzone/phpunit.xml.dist

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,22 @@
1-
<?xml version="1.0" encoding="UTF-8"?>
2-
1+
<?xml version="1.0" encoding="UTF-8" ?>
32
<!-- https://phpunit.de/manual/current/en/appendixes.configuration.html -->
4-
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
5-
xsi:noNamespaceSchemaLocation="http://schema.phpunit.de/6.1/phpunit.xsd"
6-
backupGlobals="false"
7-
colors="true"
8-
bootstrap="vendor/autoload.php"
9-
failOnRisky="true"
10-
failOnWarning="true">
3+
<phpunit
4+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
5+
xsi:noNamespaceSchemaLocation="vendor/phpunit/phpunit/phpunit.xsd"
6+
backupGlobals="false"
7+
colors="true"
8+
bootstrap="vendor/autoload.php"
9+
failOnRisky="true"
10+
failOnWarning="true"
11+
displayDetailsOnTestsThatTriggerWarnings="true"
12+
>
1113
<php>
1214
<ini name="error_reporting" value="-1" />
1315
<ini name="intl.default_locale" value="en" />
1416
<ini name="intl.error_level" value="0" />
1517
<ini name="memory_limit" value="-1" />
1618
<env name="SHELL_VERBOSITY" value="-1" />
17-
<server name="SYMFONY_DEPRECATIONS_HELPER" value="max[self]=0&amp;max[direct]=0"/>
19+
<server name="SYMFONY_DEPRECATIONS_HELPER" value="max[self]=0&amp;max[direct]=0" />
1820
</php>
1921

2022
<testsuites>
@@ -23,9 +25,9 @@
2325
</testsuite>
2426
</testsuites>
2527

26-
<filter>
27-
<whitelist>
28+
<source>
29+
<include>
2830
<directory>./src</directory>
29-
</whitelist>
30-
</filter>
31+
</include>
32+
</source>
3133
</phpunit>

src/Icons/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
"symfony/asset-mapper": "^6.4|^7.0",
4444
"symfony/console": "^6.4|^7.0",
4545
"symfony/http-client": "6.4|^7.0",
46-
"symfony/phpunit-bridge": "^6.3|^7.0",
46+
"phpunit/phpunit": "^10.5",
4747
"symfony/ux-twig-component": "^2.14",
4848
"zenstruck/console-test": "^1.5",
4949
"psr/log": "^2|^3"

src/Icons/phpunit.xml.dist

Lines changed: 15 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,18 @@
1-
<?xml version="1.0" encoding="UTF-8"?>
2-
1+
<?xml version="1.0" encoding="UTF-8" ?>
32
<!-- https://phpunit.de/manual/current/en/appendixes.configuration.html -->
4-
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
5-
xsi:noNamespaceSchemaLocation="vendor/bin/.phpunit/phpunit.xsd"
6-
colors="true"
7-
bootstrap="tests/bootstrap.php"
8-
failOnRisky="true"
9-
failOnWarning="true"
3+
<phpunit
4+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
5+
xsi:noNamespaceSchemaLocation="vendor/phpunit/phpunit/phpunit.xsd"
6+
colors="true"
7+
bootstrap="tests/bootstrap.php"
8+
failOnRisky="true"
9+
failOnWarning="true"
10+
displayDetailsOnTestsThatTriggerWarnings="true"
1011
>
1112
<php>
1213
<ini name="error_reporting" value="-1" />
1314
<server name="KERNEL_CLASS" value="Symfony\UX\Icons\Tests\Fixtures\TestKernel" />
14-
<server name="SYMFONY_DEPRECATIONS_HELPER" value="max[self]=0&amp;max[direct]=0"/>
15+
<server name="SYMFONY_DEPRECATIONS_HELPER" value="max[self]=0&amp;max[direct]=0" />
1516
</php>
1617

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

23-
<filter>
24-
<whitelist processUncoveredFilesFromWhitelist="true">
25-
<directory suffix=".php">./src</directory>
26-
</whitelist>
27-
</filter>
28-
29-
<listeners>
30-
<listener class="Symfony\Bridge\PhpUnit\SymfonyTestsListener"/>
31-
</listeners>
24+
<source>
25+
<include>
26+
<directory>./src</directory>
27+
</include>
28+
</source>
3229
</phpunit>

src/Icons/src/Icon.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,9 +88,12 @@ public static function fromFile(string $filename): self
8888
$svgDoc->preserveWhiteSpace = false;
8989

9090
try {
91+
set_error_handler(static fn ($type, $msg, $file, $line) => throw new \ErrorException($msg, 0, $type, $file, $line));
9192
$svgDoc->loadXML($svg);
9293
} catch (\Throwable $e) {
9394
throw new \RuntimeException(\sprintf('The icon file "%s" does not contain a valid SVG.', $filename), previous: $e);
95+
} finally {
96+
restore_error_handler();
9497
}
9598

9699
$svgElements = $svgDoc->getElementsByTagName('svg');

src/LazyImage/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,9 @@
3636
"require-dev": {
3737
"intervention/image": "^2.5|^3.0",
3838
"kornrunner/blurhash": "^1.1",
39+
"phpunit/phpunit": "^10.5",
3940
"symfony/cache-contracts": "^2.2",
4041
"symfony/framework-bundle": "^5.4|^6.0|^7.0",
41-
"symfony/phpunit-bridge": "^5.2|^6.0|^7.0",
4242
"symfony/twig-bundle": "^5.4|^6.0|^7.0",
4343
"symfony/var-dumper": "^5.4|^6.0|^7.0"
4444
},

src/LazyImage/phpunit.xml.dist

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,22 @@
1-
<?xml version="1.0" encoding="UTF-8"?>
2-
1+
<?xml version="1.0" encoding="UTF-8" ?>
32
<!-- https://phpunit.de/manual/current/en/appendixes.configuration.html -->
4-
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
5-
xsi:noNamespaceSchemaLocation="http://schema.phpunit.de/6.1/phpunit.xsd"
6-
backupGlobals="false"
7-
colors="true"
8-
bootstrap="vendor/autoload.php"
9-
failOnRisky="true"
10-
failOnWarning="true">
3+
<phpunit
4+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
5+
xsi:noNamespaceSchemaLocation="vendor/phpunit/phpunit/phpunit.xsd"
6+
backupGlobals="false"
7+
colors="true"
8+
bootstrap="vendor/autoload.php"
9+
failOnRisky="true"
10+
failOnWarning="true"
11+
displayDetailsOnTestsThatTriggerWarnings="true"
12+
>
1113
<php>
1214
<ini name="error_reporting" value="-1" />
1315
<ini name="intl.default_locale" value="en" />
1416
<ini name="intl.error_level" value="0" />
1517
<ini name="memory_limit" value="-1" />
1618
<env name="SHELL_VERBOSITY" value="-1" />
17-
<server name="SYMFONY_DEPRECATIONS_HELPER" value="max[self]=0&amp;max[direct]=0"/>
19+
<server name="SYMFONY_DEPRECATIONS_HELPER" value="max[self]=0&amp;max[direct]=0" />
1820
</php>
1921

2022
<testsuites>
@@ -23,9 +25,9 @@
2325
</testsuite>
2426
</testsuites>
2527

26-
<filter>
27-
<whitelist>
28+
<source>
29+
<include>
2830
<directory>./src</directory>
29-
</whitelist>
30-
</filter>
31+
</include>
32+
</source>
3133
</phpunit>

src/LiveComponent/composer.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@
4141
"doctrine/orm": "^2.9.4",
4242
"doctrine/persistence": "^2.5.2|^3.0",
4343
"phpdocumentor/reflection-docblock": "5.x-dev",
44+
"phpunit/phpunit": "^10.5",
4445
"symfony/dependency-injection": "^5.4|^6.0|^7.0",
4546
"symfony/expression-language": "^5.4|^6.0|^7.0",
4647
"symfony/form": "^5.4|^6.0|^7.0",

0 commit comments

Comments
 (0)