bug #25733 [HttpKernel] Fix compile error when a legacy container is fresh again (nicolas-grekas)

This PR was merged into the 3.4 branch.

Discussion
----------

[HttpKernel] Fix compile error when a legacy container is fresh again

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #25654
| License       | MIT
| Doc PR        | -

Noticed by @jpauli again: when reverting some configuration changes ends up generating the same container as the previously legacy one, the legacy flag should be removed.

Commits
-------

8c3eadb1b1 [HttpKernel] Fix compile error when a legacy container is fresh again
This commit is contained in:
Fabien Potencier 2018-01-10 07:23:11 +01:00
commit eac7e19eb3
1 changed files with 1 additions and 0 deletions

View File

@ -851,6 +851,7 @@ abstract class Kernel implements KernelInterface, RebootableInterface, Terminabl
$fs->dumpFile($dir.$file, $code);
@chmod($dir.$file, 0666 & ~umask());
}
@unlink(dirname($dir.$file).'.legacy');
$cache->write($rootCode, $container->getResources());
}