Commit 4a3cf42
committed
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 box1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
| 24 | + | |
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| |||
0 commit comments