Skip to content
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

[FrameworkBundle] Fix resetting container between tests #45595

Merged

Conversation

nicolas-grekas
Copy link
Member

@nicolas-grekas nicolas-grekas commented Mar 1, 2022

Q A
Branch? 4.4
Bug fix? yes
New feature? no
Deprecations? no
Tickets Fix #40965, fix #45580
License MIT
Doc PR -

Replaces #45479 and #45581, related to #34078.

Calling boot() on an already booted kernel does reset the container, so we don't need to care anymore about the state of kernel.

#45580 is fixed by removing private static $kernelContainer, which can be out of sync with static::$kernel->getContainer() since KernelBrowser creates new containers when shutting down the kernel between requests.

kbond
kbond approved these changes Mar 1, 2022
Copy link
Member

@kbond kbond left a comment

I confirmed the memory leak from #40965 is still fixed.

@nicolas-grekas nicolas-grekas force-pushed the fwb-reset-test-container branch from 87c4591 to 4453bdb Mar 1, 2022
@nicolas-grekas nicolas-grekas merged commit 09ec24d into symfony:4.4 Mar 1, 2022
9 of 10 checks passed
@nicolas-grekas nicolas-grekas deleted the fwb-reset-test-container branch Mar 3, 2022
@fabpot fabpot mentioned this pull request Mar 5, 2022
@fabpot fabpot mentioned this pull request Mar 5, 2022
@fabpot fabpot mentioned this pull request Mar 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants