You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
bug #46478 [Contracts] remove static cache from ServiceSubscriberTrait (kbond)
This PR was merged into the 4.4 branch.
Discussion
----------
[Contracts] remove static cache from `ServiceSubscriberTrait`
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | n/a
| License | MIT
| Doc PR | n/a
I found an edge case when using this trait on a class that extends a parent class that implements `getSubscribedServices()`. The issue occurs if the parent _dynamically_ determines the return value of `getSubscribedServices()` based on something in the child class (in my case, using reflection). It's fine if only one class extends this parent but when multiple do, only the first class registered in the container has the proper services. The next classes have the same as the first because of the static variable.
Commits
-------
d0843be [DependencyInjection] remove static cache from `ServiceSubscriberTrait`
0 commit comments