-
-
Notifications
You must be signed in to change notification settings - Fork 447
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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix resetting non-lazy managers #1108
Fix resetting non-lazy managers #1108
Conversation
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.
Just one thing and good to me.
|
||
private function resetOrClearManager(string $managerName, string $serviceId) : void | ||
{ | ||
if (! $this->container->initialized($serviceId)) { | ||
return; |
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.
The method is not in the interface so it needs an extra check before calling it.
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.
The type hint for the $container
property in ManagerRegistry
specifies this as a Container
, not ContainerInterface
. Similarly, the resetService
method there doesn't check for this either. We should either fix the type hint and calls in ManagerRegistry
, or restrict the constructor type hint in Registry
to no longer accept any ContainerInterface
.
Given the BC implications of changing the constructor signature in the bundle, I'd rather fix this in the bridge. I can create the PR if you agree.
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.
Ok thanks for double checking. No need for more on my side.
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.
applied patch works 馃憤 we never faced any issues in web :)
thanks @alcaeus
Release will happen later today. I'll let some folks test this before doing it 馃槈 |
See #1106 (comment).
This refines the logic for resetting managers on
kernel.reset
:resetManager
EntityManager::clear
Also adds tests for all use-cases.
@ro0NL can you give this a test and see if it works? As much as I love releasing with our new tools, I'm afraid I'll run out of release numbers by the time this is fixed 馃槀