Skip to content

Commit 279be9c

Browse files
minor #61469 [PhpUnitBridge] Patch phpunit to clear php8.5 deprecation (nicolas-grekas)
This PR was merged into the 7.4 branch. Discussion ---------- [PhpUnitBridge] Patch phpunit to clear php8.5 deprecation | Q | A | ------------- | --- | Branch? | 7.4 | Bug fix? | no | New feature? | no | Deprecations? | no | Issues | - | License | MIT This backports sebastianbergmann/phpunit@0eae114 to any phpunit versions - to ease migration for other projects and make our CI green ASAP. Commits ------- f982ee3 [PhpUnitBridge] Patch phpunit to clear php8.5 deprecation
2 parents 6a6842e + f982ee3 commit 279be9c

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/Symfony/Bridge/PhpUnit/bin/simple-phpunit.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -270,6 +270,12 @@
270270
exit($exit);
271271
}
272272

273+
$alteredCode = file_get_contents($alteredFile = './src/Runner/PhptTestCase.php');
274+
if (str_contains($alteredCode, " 'report_memleaks=0',\n")) {
275+
$alteredCode = str_replace(" 'report_memleaks=0',\n", '', $alteredCode);
276+
file_put_contents($alteredFile, $alteredCode);
277+
}
278+
273279
// Mutate TestCase code
274280
if (version_compare($PHPUNIT_VERSION, '11.0', '<')) {
275281
$alteredCode = file_get_contents($alteredFile = './src/Framework/TestCase.php');

0 commit comments

Comments
 (0)