Skip to content

Commit 729ea25

Browse files
bugfix(#61139): Only generate an outputDir if none is set.
1 parent 12ee083 commit 729ea25

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

Tests/Builder/GeneratedConfigTest.php

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -159,10 +159,12 @@ public function testSetExtraKeyMethodIsNotGeneratedWhenAllowExtraKeysIsFalse()
159159
*/
160160
private function generateConfigBuilder(string $configurationClass, ?string &$outputDir = null)
161161
{
162-
$outputDir = tempnam(sys_get_temp_dir(), 'sf_config_builder_');
163-
unlink($outputDir);
164-
mkdir($outputDir);
165-
$this->tempDir[] = $outputDir;
162+
if (null === $outputDir) {
163+
$outputDir = tempnam(sys_get_temp_dir(), 'sf_config_builder_');
164+
unlink($outputDir);
165+
mkdir($outputDir);
166+
$this->tempDir[] = $outputDir;
167+
}
166168

167169
$configuration = new $configurationClass();
168170
$rootNode = $configuration->getConfigTreeBuilder()->buildTree();

0 commit comments

Comments
 (0)