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
When using a method of a service as configurator, the PhpDumper expects this service to be available through ->get(). This means we cannot use a private service here as the optimization would try to inline it (and even drop it entirely as it does not check configurators).
The easiest fix is probably to change the optimization pass to check configurators and force keeping services, as the XmlLoader does not support inline services for the configurator.
…urators (realityking)
This PR was merged into the 2.5-dev branch.
Discussion
----------
[DependencyInjection] added support for inlining Configurators
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
This is one commit from #9432.
As mentioned in #3758 configurators can not be private (it's just ignored). This pull changes that and allows them to be inlined. It it also creates better code if a configurator is used multiple times for one service (i.e. to both inject it and configure the same service, or to configure multiple inlined services) but this should be very rare.
Commits
-------
4e9aa07 [DependencyInjection] added support for inlining Configurators
When using a method of a service as configurator, the PhpDumper expects this service to be available through
->get()
. This means we cannot use a private service here as the optimization would try to inline it (and even drop it entirely as it does not check configurators).The easiest fix is probably to change the optimization pass to check configurators and force keeping services, as the XmlLoader does not support inline services for the configurator.
/cc @schmittjoh
The text was updated successfully, but these errors were encountered: