|
13 | 13 |
|
14 | 14 | use Doctrine\Common\Annotations\AnnotationRegistry;
|
15 | 15 | use Doctrine\Common\Annotations\Reader;
|
| 16 | +use Psr\Cache\CacheItemPoolInterface; |
16 | 17 | use Psr\Log\LoggerAwareInterface;
|
17 | 18 | use Symfony\Bridge\Monolog\Processor\DebugProcessor;
|
18 | 19 | use Symfony\Bridge\Monolog\Processor\ProcessorInterface;
|
|
25 | 26 | use Symfony\Component\Cache\Adapter\AdapterInterface;
|
26 | 27 | use Symfony\Component\Cache\Adapter\ArrayAdapter;
|
27 | 28 | use Symfony\Component\Cache\Adapter\TagAwareAdapter;
|
| 29 | +use Symfony\Component\Cache\CacheInterface; |
28 | 30 | use Symfony\Component\Cache\Marshaller\DefaultMarshaller;
|
29 | 31 | use Symfony\Component\Cache\Marshaller\MarshallerInterface;
|
30 | 32 | use Symfony\Component\Cache\ResettableInterface;
|
|
95 | 97 | use Symfony\Component\Validator\ObjectInitializerInterface;
|
96 | 98 | use Symfony\Component\WebLink\HttpHeaderSerializer;
|
97 | 99 | use Symfony\Component\Workflow;
|
| 100 | +use Symfony\Component\Workflow\WorkflowInterface; |
98 | 101 | use Symfony\Component\Yaml\Command\LintCommand as BaseYamlLintCommand;
|
99 | 102 | use Symfony\Component\Yaml\Yaml;
|
100 | 103 | use Symfony\Contracts\Service\ResetInterface;
|
@@ -581,6 +584,7 @@ private function registerWorkflowConfiguration(array $config, ContainerBuilder $
|
581 | 584 | // Store to container
|
582 | 585 | $container->setDefinition($workflowId, $workflowDefinition);
|
583 | 586 | $container->setDefinition(sprintf('%s.definition', $workflowId), $definitionDefinition);
|
| 587 | + $container->registerAliasForArgument($workflowId, WorkflowInterface::class, $name.'.'.$type); |
584 | 588 |
|
585 | 589 | // Add workflow to Registry
|
586 | 590 | if ($workflow['supports']) {
|
@@ -1452,6 +1456,10 @@ private function registerLockConfiguration(array $config, ContainerBuilder $cont
|
1452 | 1456 | $container->setAlias(StoreInterface::class, new Alias('lock.store', false));
|
1453 | 1457 | $container->setAlias(Factory::class, new Alias('lock.factory', false));
|
1454 | 1458 | $container->setAlias(LockInterface::class, new Alias('lock', false));
|
| 1459 | + } else { |
| 1460 | + $container->registerAliasForArgument('lock.'.$resourceName.'.store', StoreInterface::class, $resourceName.'.lock.store'); |
| 1461 | + $container->registerAliasForArgument('lock.'.$resourceName.'.factory', Factory::class, $resourceName.'.lock.factory'); |
| 1462 | + $container->registerAliasForArgument('lock.'.$resourceName, LockInterface::class, $resourceName.'.lock'); |
1455 | 1463 | }
|
1456 | 1464 | }
|
1457 | 1465 | }
|
@@ -1509,6 +1517,8 @@ private function registerMessengerConfiguration(array $config, ContainerBuilder
|
1509 | 1517 | if ($busId === $config['default_bus']) {
|
1510 | 1518 | $container->setAlias('message_bus', $busId)->setPublic(true);
|
1511 | 1519 | $container->setAlias(MessageBusInterface::class, $busId);
|
| 1520 | + } else { |
| 1521 | + $container->registerAliasForArgument($busId, MessageBusInterface::class); |
1512 | 1522 | }
|
1513 | 1523 | }
|
1514 | 1524 |
|
@@ -1593,6 +1603,8 @@ private function registerCacheConfiguration(array $config, ContainerBuilder $con
|
1593 | 1603 | $pool['adapter'] = '.'.$pool['adapter'].'.inner';
|
1594 | 1604 | }
|
1595 | 1605 | $definition = new ChildDefinition($pool['adapter']);
|
| 1606 | + $container->registerAliasForArgument($name, CacheInterface::class); |
| 1607 | + $container->registerAliasForArgument($name, CacheItemPoolInterface::class); |
1596 | 1608 |
|
1597 | 1609 | if ($pool['tags']) {
|
1598 | 1610 | if ($config['pools'][$pool['tags']]['tags'] ?? false) {
|
|
0 commit comments