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
feature #46752 [DependencyInjection] Use lazy-loading ghost object proxies out of the box (nicolas-grekas)
This PR was merged into the 6.2 branch.
Discussion
----------
[DependencyInjection] Use lazy-loading ghost object proxies out of the box
| Q | A
| ------------- | ---
| Branch? | 6.2
| Bug fix? | no
| New feature? | yes
| Deprecations? | no
| Tickets | Fix #35345
| License | MIT
| Doc PR | -
This PR builds on #46751. It also replaces #46458.
Instead of using ProxyManager to make lazy services actually lazy, using `LazyGhostObjectTrait` from #46751 allows doing so *out of the box* - aka without the need to install any optional dependencies.
When a virtual proxy is required (typically when using [the `proxy` tag](symfony/symfony#27697)), ProxyManager is still required (and the dep remains optional.)
But for most services, using `LazyGhostObjectTrait` just works \o/
Commits
-------
58a184826a [DependencyInjection] Use lazy-loading ghost object proxies out of the box
0 commit comments