Skip to content

Commit 88a4dfe

Browse files
[PhpUnitBridge] Patch phpunit to clear php8.5 deprecation
1 parent bcc204f commit 88a4dfe

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

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)