Closed
Description
Q | A |
---|---|
Bug report? | yes |
Feature request? | no |
BC Break report? | yes |
RFC? | no |
Symfony version | 3.4.x-dev |
I tried to upgrade from 3.3 to 3.4.x-dev to test compatibility and found that all of my services made private by default. It happes from Symfony\Component\DependencyInjection\Compiler\ResolveChildDefinitionsPass::process
method:
foreach ($container->getDefinitions() as $definition) {
if ($definition->isPrivate()) {
$definition->setPublic(false);
$definition->setPrivate(true);
}
}
->isPrivate()
method returns true
for all services by default, because \Symfony\Component\DependencyInjection\Definition::$private
set as true
by default.
/cc @nicolas-grekas