feature #26341 Autoconfigure service locator tag (apfelbox)
This PR was squashed before being merged into the 4.1-dev branch (closes #26341).
Discussion
----------
Autoconfigure service locator tag
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #26187
| License | MIT
| Doc PR | —
We will now also autoconfigure the (required) tag `container.service_locator` for all `ServiceLocator`s.
I couldn't find any integration tests for the whole list of autoconfigured core services, so I didn't add any new tests.
Commits
-------
c4b9b42
Autoconfigure service locator tag
This commit is contained in:
commit
b2df671912
@ -16,6 +16,7 @@ CHANGELOG
|
||||
* Deprecated `bundle:controller:action` syntax to reference controllers. Use `serviceOrFqcn::method` instead where `serviceOrFqcn`
|
||||
is either the service ID or the FQCN of the controller.
|
||||
* Deprecated `Symfony\Bundle\FrameworkBundle\Controller\ControllerNameParser`
|
||||
* The `container.service_locator` tag of `ServiceLocator`s is now autoconfigured.
|
||||
|
||||
4.0.0
|
||||
-----
|
||||
|
@ -42,6 +42,7 @@ use Symfony\Component\DependencyInjection\Parameter;
|
||||
use Symfony\Component\DependencyInjection\ParameterBag\ContainerBagInterface;
|
||||
use Symfony\Component\DependencyInjection\ParameterBag\ParameterBagInterface;
|
||||
use Symfony\Component\DependencyInjection\Reference;
|
||||
use Symfony\Component\DependencyInjection\ServiceLocator;
|
||||
use Symfony\Component\DependencyInjection\ServiceSubscriberInterface;
|
||||
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
|
||||
use Symfony\Component\ExpressionLanguage\ExpressionLanguage;
|
||||
@ -288,6 +289,8 @@ class FrameworkExtension extends Extension
|
||||
->addTag('config_cache.resource_checker');
|
||||
$container->registerForAutoconfiguration(EnvVarProcessorInterface::class)
|
||||
->addTag('container.env_var_processor');
|
||||
$container->registerForAutoconfiguration(ServiceLocator::class)
|
||||
->addTag('container.service_locator');
|
||||
$container->registerForAutoconfiguration(ServiceSubscriberInterface::class)
|
||||
->addTag('container.service_subscriber');
|
||||
$container->registerForAutoconfiguration(ArgumentValueResolverInterface::class)
|
||||
|
Reference in New Issue
Block a user