8000 enable container.autowiring.strict_mode · symfony/symfony-standard@a6a19c5 · GitHub
[go: up one dir, main page]

Skip to content
This repository was archived by the owner on Nov 27, 2020. It is now read-only.

Commit a6a19c5

Browse files
committed
enable container.autowiring.strict_mode
1 parent 17eb8ff commit a6a19c5

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

app/AppKernel.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
<?php
22

3+
use Symfony\Component\DependencyInjection\ContainerBuilder;
34
use Symfony\Component\HttpKernel\Kernel;
45
use Symfony\Component\Config\Loader\LoaderInterface;
56

@@ -49,6 +50,12 @@ public function getLogDir()
4950

5051
public function registerContainerConfiguration(LoaderInterface $loader)
5152
{
53+
$loader->load(function (ContainerBuilder $container) {
54+
$container->setParameter('container.autowiring.strict_mode', true);
55+
$container->setParameter('container.dumper.inline_class_loader', true);
56+
57+
$container->addObjectResource($this);
58+
});
5259
$loader->load($this->getRootDir().'/config/config_'.$this->getEnvironment().'.yml');
5360
}
5461
}

0 commit comments

Comments
 (0)
0