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
Prevent infinite nesting of lazy ObjectManager instances when ObjectManager is reset
This patch ensures that the `ObjectManager` that the `Symfony\Bridge\Doctrine\ManagerRegistry`
replaces during `Symfony\Bridge\Doctrine\ManagerRegistry#resetService()` operations is a fresh
non-lazy service.
Before this change, `Symfony\Bridge\Doctrine\ManagerRegistry#resetService()` would replace the
initialization of the lazy proxy with a new service each time, but that service being lazy, this
led to an additional proxy nesting level at each service reset call. That leads to general
issues around memory reliability, stack trace nesting (and therefore bigger logged traces) and
potentially even stack overflow problems, when running with XDebug.
The problem seems to only apply when the `symfony/dependency-injection` `Container` is compiled
as a set of small factory files: that's because each generated factory has a boolean flag that
indicates whether a lazy or non-lazy version of a service is requested, as introduced in the
original implementation at #7890
0 commit comments