Skip to content

[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

Merged
merged 1 commit into from
Apr 26, 2018

Conversation

nicolas-grekas
Copy link
Member

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);
Copy link
Member

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 ?

Copy link
Member Author

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 :)

@nicolas-grekas nicolas-grekas merged commit be8dbc3 into symfony:3.4 Apr 26, 2018
nicolas-grekas added a commit that referenced this pull request Apr 26, 2018
…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
@nicolas-grekas nicolas-grekas deleted the kernel-legacy-clean branch April 26, 2018 21:09
This was referenced Apr 30, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants