Skip to content

Conversation

nicolas-grekas
Copy link
Member

@nicolas-grekas nicolas-grekas commented May 31, 2021

Q A
Branch? 5.3
Bug fix? yes
New feature? no
Deprecations? no
Tickets Fix #41011, #41128
License MIT
Doc PR -

In prod mode, because we hack the kernel to recreate a container builder at runtime for introspection needs, we end up with a broken object graph. Calling $this->initializeBundles() creates fresh bundle instances and that fixes the issue.

This could be merged on 5.2, but we don't need the fix on 5.2 because we never encountered the situation before adding the cache warmer for config builders.

@nicolas-grekas nicolas-grekas added this to the 5.3 milestone May 31, 2021
@carsonbot carsonbot changed the title [FrameworkBundle] fix creating ContainerBuilder at warmup/CLI time fix creating ContainerBuilder at warmup/CLI time May 31, 2021
@carsonbot carsonbot changed the title fix creating ContainerBuilder at warmup/CLI time [FrameworkBundle] fix creating ContainerBuilder at warmup/CLI time May 31, 2021
@fabpot
Copy link
Member

fabpot commented May 31, 2021

Thank you @nicolas-grekas.

@fabpot fabpot merged commit 16c382a into symfony:5.3 May 31, 2021
@fabpot fabpot deleted the fix-warmup branch May 31, 2021 09:07
@Nyholm
Copy link
Member

Nyholm commented May 31, 2021

Oh. Thank you for this fix.

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.

4 participants