|
17 | 17 | use Symfony\Component\Config\Definition\Exception\InvalidConfigurationException;
|
18 | 18 | use Symfony\Component\Config\FileLocator;
|
19 | 19 | use Symfony\Component\DependencyInjection\Argument\AbstractArgument;
|
| 20 | +use Symfony\Component\DependencyInjection\Argument\ServiceLocatorArgument; |
| 21 | +use Symfony\Component\DependencyInjection\Argument\TaggedIteratorArgument; |
20 | 22 | use Symfony\Component\DependencyInjection\ChildDefinition;
|
21 | 23 | use Symfony\Component\DependencyInjection\ContainerBuilder;
|
22 | 24 | use Symfony\Component\DependencyInjection\Exception\LogicException;
|
|
36 | 38 | use Symfony\UX\TwigComponent\Twig\ComponentLexer;
|
37 | 39 | use Symfony\UX\TwigComponent\Twig\ComponentRuntime;
|
38 | 40 | use Symfony\UX\TwigComponent\Twig\TwigEnvironmentConfigurator;
|
39 |
| -use function Symfony\Component\DependencyInjection\Loader\Configurator\service; |
40 |
| -use function Symfony\Component\DependencyInjection\Loader\Configurator\service_locator; |
41 | 41 |
|
42 | 42 | /**
|
43 | 43 | * @author Kevin Bond <kevinbond@gmail.com>
|
@@ -110,10 +110,7 @@ class_exists(AbstractArgument::class) ? new AbstractArgument(\sprintf('Added in
|
110 | 110 | $container->register('.ux.twig_component.twig.component_runtime', ComponentRuntime::class)
|
111 | 111 | ->setArguments([
|
112 | 112 | new Reference('ux.twig_component.component_renderer'),
|
113 |
| - service_locator([ |
114 |
| - 'ux:icon' => service('.ux_icons.twig_icon_runtime')->nullOnInvalid(), |
115 |
| - 'ux:map' => service('ux_map.twig_runtime')->nullOnInvalid(), |
116 |
| - ]), |
| 113 | + new ServiceLocatorArgument(new TaggedIteratorArgument('ux.twig_component.twig_renderer', indexAttribute: 'key', needsIndexes: true)), |
117 | 114 | ])
|
118 | 115 | ->addTag('twig.runtime')
|
119 | 116 | ;
|
|
0 commit comments