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\UtilitiesBundle\DependencyInjection; |
||
4 | |||
5 | use Symfony\Component\Config\FileLocator; |
||
6 | use Symfony\Component\DependencyInjection\ContainerBuilder; |
||
7 | use Symfony\Component\DependencyInjection\Loader; |
||
8 | use Symfony\Component\HttpKernel\DependencyInjection\Extension; |
||
9 | |||
10 | /** |
||
11 | * This is the class that loads and manages your bundle configuration |
||
12 | * |
||
13 | * To learn more see {@link http://symfony.com/doc/current/cookbook/bundles/extension.html} |
||
14 | */ |
||
15 | class KunstmaanUtilitiesExtension extends Extension |
||
16 | { |
||
17 | /** |
||
18 | * {@inheritdoc} |
||
19 | */ |
||
20 | 6 | public function load(array $configs, ContainerBuilder $container) |
|
21 | { |
||
22 | 6 | $configuration = new Configuration(); |
|
23 | 6 | $config = $this->processConfiguration($configuration, $configs); |
|
24 | |||
25 | 6 | if ($container->hasParameter('kunstmaan_utilities.cipher.secret')) { |
|
26 | 1 | @trigger_error('Setting the "kunstmaan_utilities.cipher.secret" parameter is deprecated since KunstmaanUtilitiesBundle 5.2, this value will be ignored/overwritten in KunstmaanUtilitiesBundle 6.0. Use the "kunstmaan_utilities.cipher.secret" config instead if you want to set a different value than the default "%kernel.secret%".', E_USER_DEPRECATED); |
|
0 ignored issues
–
show
|
|||
27 | 5 | } elseif ($container->hasParameter('secret')) { |
|
28 | 4 | $container->setParameter('kunstmaan_utilities.cipher.secret', $container->getParameter('secret')); |
|
29 | } else { |
||
30 | 1 | $container->setParameter('kunstmaan_utilities.cipher.secret', $config['cipher']['secret']); |
|
31 | } |
||
32 | |||
33 | 6 | $loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config')); |
|
34 | 6 | $loader->load('commands.yml'); |
|
35 | 6 | $loader->load('services.yml'); |
|
36 | 6 | } |
|
37 | } |
||
38 |
If you suppress an error, we recommend checking for the error condition explicitly: