-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[HttpKernel] Don't clean legacy containers that are still loaded #27061
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[HttpKernel] Don't clean legacy containers that are still loaded #27061
Conversation
nicolas-grekas
commented
Apr 26, 2018
Q | A |
---|---|
Branch? | 3.4 |
Bug fix? | yes |
New feature? | |
BC breaks? | no |
Deprecations? | no |
Tests pass? | yes |
Fixed tickets | #27053 |
License | MIT |
Doc PR | - |
if ($oldContainerDir.'.legacy' !== $legacyContainer && @unlink($legacyContainer)) { | ||
(new Filesystem())->remove(substr($legacyContainer, 0, -7)); | ||
} | ||
} | ||
|
||
touch($oldContainerDir.'.legacy'); | ||
file_put_contents($oldContainerDir.'.legacy', $oldContainer->name); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe you should append to the file ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure what you mean. There is one legacy file per legacy container.
Anyway, I completely changed the implementation.
No extra IO is required as a static array can do the job :)
586dbec
to
be8dbc3
Compare
…loaded (nicolas-grekas) This PR was merged into the 3.4 branch. Discussion ---------- [HttpKernel] Don't clean legacy containers that are still loaded | Q | A | ------------- | --- | Branch? | 3.4 | Bug fix? | yes | New feature? | | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | #27053 | License | MIT | Doc PR | - Commits ------- be8dbc3 [HttpKernel] Don't clean legacy containers that are still loaded