Completed
Branch master (a0c467)
by Tomáš
02:00
created

AliasingCompilerPass   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 10
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2
Metric Value
wmc 1
lcom 0
cbo 2
dl 0
loc 10
rs 10
1
<?php
2
3
namespace Symplify\ControllerAutowire\Tests\AliasingBundle\DependencyInjection\Compiler;
4
5
use Symfony\Component\DependencyInjection\Alias;
6
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
7
use Symfony\Component\DependencyInjection\ContainerBuilder;
8
9
/**
10
 * This is done by JMSDiExtraBundle.
11
 *
12
 * @see https://github.com/adam187/JMSDiExtraBundle/blob/59b9745f6d02dcaee69b8a78a22119475d26273f/DependencyInjection/Compiler/IntegrationPass.php#L37
13
 *
14
 * And might be done by others of course.
15
 *
16
 * It disables decoration for controller_resolver.
17
 */
18
final class AliasingCompilerPass implements CompilerPassInterface
19
{
20
    /**
21
     * {@inheritdoc}
22
     */
23
    public function process(ContainerBuilder $containerBuilder)
24
    {
25
        $containerBuilder->setAlias('controller_resolver', new Alias('some_alias.controller_resolver', false));
26
    }
27
}
28