Skip to content

Commit 9939162

Browse files
committed
[Tests] Fix comptability with PHPUnit 10+ recipes
1 parent 3ee0811 commit 9939162

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/Test/MakerTestEnvironment.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -275,12 +275,14 @@ private function buildFlexSkeleton(): void
275275
'filename' => '.env.test',
276276
'find' => 'SYMFONY_DEPRECATIONS_HELPER=999999',
277277
'replace' => 'SYMFONY_DEPRECATIONS_HELPER=max[self]=0',
278+
'allow_not_found' => true, // Not present in PHPUnit 11+ recipe
278279
],
279280
// do not explicitly set the PHPUnit version
280281
[
281282
'filename' => 'phpunit.xml.dist',
282283
'find' => '<server name="SYMFONY_PHPUNIT_VERSION" value="9.6" />',
283284
'replace' => '',
285+
'allow_not_found' => true, // Not present in PHPUnit 10+ recipe
284286
],
285287
];
286288
$this->processReplacements($replacements, $this->flexPath);
@@ -297,7 +299,7 @@ private function buildFlexSkeleton(): void
297299
private function processReplacements(array $replacements, string $rootDir): void
298300
{
299301
foreach ($replacements as $replacement) {
300-
$this->processReplacement($rootDir, $replacement['filename'], $replacement['find'], $replacement['replace']);
302+
$this->processReplacement($rootDir, $replacement['filename'], $replacement['find'], $replacement['replace'], $replacement['allow_not_found'] ?? false);
301303
}
302304
}
303305

0 commit comments

Comments
 (0)