Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit f974e7c

Browse filesBrowse files
authored
Allow running PHPUnit with "xdebug.scream" ON
Since #25733 the Kernel attempts to unlink the legacy container while being built. This throws an error if the file did not exist, for example on a clean install, on the build, which is then silenced. That's fine on production systems, but on our build we have enabled "xdebug.scream" in order to visualise every errors, which basically un-silences the errors. I believe there should not be a need to silence anything on a usual, clean usage of the system. Making this `unlink` conditional fixes it. Could you please approve and merge this PR? Thanks
1 parent 562448a commit f974e7c
Copy full SHA for f974e7c

File tree

1 file changed

+4
-1
lines changed
Filter options

1 file changed

+4
-1
lines changed

‎src/Symfony/Component/HttpKernel/Kernel.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/HttpKernel/Kernel.php
+4-1Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -743,7 +743,10 @@ protected function dumpContainer(ConfigCache $cache, ContainerBuilder $container
743743
$fs->dumpFile($dir.$file, $code);
744744
@chmod($dir.$file, 0666 & ~umask());
745745
}
746-
@unlink(\dirname($dir.$file).'.legacy');
746+
$legacyFile = \dirname($dir.$file).'.legacy';
747+
if (file_exists($legacyFile)) {
748+
@unlink($legacyFile);
749+
}
747750

748751
$cache->write($rootCode, $container->getResources());
749752
}

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.