These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more
1 | <?php |
||
2 | |||
3 | namespace Kunstmaan\AdminBundle\DependencyInjection\Compiler; |
||
4 | |||
5 | use Kunstmaan\AdminBundle\Helper\DomainConfiguration; |
||
6 | use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; |
||
7 | use Symfony\Component\DependencyInjection\ContainerBuilder; |
||
8 | use Symfony\Component\DependencyInjection\Reference; |
||
9 | |||
10 | View Code Duplication | class DomainConfigurationPass implements CompilerPassInterface |
|
11 | { |
||
12 | public function process(ContainerBuilder $container) |
||
13 | { |
||
14 | if ($container->hasParameter('kunstmaan_admin.domain_configuration.class') && $container->getParameter('kunstmaan_admin.domain_configuration.class') !== DomainConfiguration::class) { |
||
15 | @trigger_error( |
||
0 ignored issues
–
show
|
|||
16 | 'Overriding the domain configuration class by setting the "kunstmaan_admin.domain_configuration.class" parameter is deprecated since KunstmaanAdminDomainBundle 5.1 and will be removed in KunstmaanAdminDomainBundle 6.0. Register your custom configuration class as a service and override the "kunstmaan_admin.domain_configuration" service alias.', |
||
17 | E_USER_DEPRECATED |
||
18 | ); |
||
19 | |||
20 | // Inject the container back, to keep BC, if the user override the domain configuration with the "kunstmaan_admin.domain_configuration.class" parameter. |
||
21 | if ($container->hasDefinition('kunstmaan_admin.domain_configuration')) { |
||
22 | $container->getDefinition('kunstmaan_admin.domain_configuration')->setArguments([new Reference('service_container')]); |
||
23 | } |
||
24 | } |
||
25 | } |
||
26 | } |
||
27 |
If you suppress an error, we recommend checking for the error condition explicitly: