Skip to content

[DependencyInjection] fix auto-refresh when inline_factories is enabled #44010

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
Nov 12, 2021

Conversation

nicolas-grekas
Copy link
Member

Q A
Branch? 5.4
Bug fix? yes
New feature? no
Deprecations? no
Tickets Fix #43956
License MIT
Doc PR -

This is more an improvement than a bugfix to me, thus the 5.4 target.

When inline_factories is set, we also inline proxy classes in the dumped container.
This breaks auto-refreshing the cache when a proxyfied class is removed (as described in the linked issue).
This PR fixes the issue by dumping proxy classes in a new proxy-classes.php file. This file is loaded only after the cache has been checked, when the container is initialized.

@carsonbot
Copy link

Hey!

I think @maxime-aknin has recently worked with this code. Maybe they can help review this?

Cheers!

Carsonbot

@fabpot
Copy link
Member

fabpot commented Nov 12, 2021

Thank you @nicolas-grekas.

@fabpot fabpot merged commit d168881 into symfony:5.4 Nov 12, 2021
@nicolas-grekas nicolas-grekas deleted the di-proxy branch November 13, 2021 14:10
This was referenced Nov 14, 2021
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.

[HttpKernel][DependencyInjection][ProxyManager] Class loading error with inline factories
3 participants