| @@ 647-680 (lines=34) @@ | ||
| 644 | * |
|
| 645 | * @param \Symfony\Component\DependencyInjection\ContainerBuilder $containerBuilder |
|
| 646 | */ |
|
| 647 | private function setAllServicesPublic(ContainerBuilder $containerBuilder): void |
|
| 648 | { |
|
| 649 | $definitions = $containerBuilder->getDefinitions(); |
|
| 650 | ||
| 651 | foreach ($definitions as $id => $definition) { |
|
| 652 | if ( |
|
| 653 | $id && '.' !== $id[0] |
|
| 654 | && (!$definition->isPublic() || $definition->isPrivate()) |
|
| 655 | && !$definition->getErrors() |
|
| 656 | && !$definition->isAbstract() |
|
| 657 | ) { |
|
| 658 | $definition->setPrivate(false); |
|
| 659 | $definition->setPublic(true); |
|
| 660 | } |
|
| 661 | } |
|
| 662 | ||
| 663 | $aliases = $containerBuilder->getAliases(); |
|
| 664 | foreach ($aliases as $id => $alias) { |
|
| 665 | if ($id && '.' !== $id[0] && (!$alias->isPublic() || $alias->isPrivate())) { |
|
| 666 | while (isset($aliases[$target = (string) $alias])) { |
|
| 667 | $alias = $aliases[$target]; |
|
| 668 | } |
|
| 669 | if ( |
|
| 670 | isset($definitions[$target]) |
|
| 671 | && !$definitions[$target]->getErrors() |
|
| 672 | && !$definitions[$target]->isAbstract() |
|
| 673 | ) { |
|
| 674 | ||
| 675 | $definition->setPrivate(false); |
|
| 676 | $definition->setPublic(true); |
|
| 677 | } |
|
| 678 | } |
|
| 679 | } |
|
| 680 | } |
|
| 681 | } |
|
| 682 | ||
| @@ 226-259 (lines=34) @@ | ||
| 223 | * |
|
| 224 | * @param \Symfony\Component\DependencyInjection\ContainerBuilder $containerBuilder |
|
| 225 | */ |
|
| 226 | private function setAllServicesPublic(ContainerBuilder $containerBuilder): void |
|
| 227 | { |
|
| 228 | $definitions = $containerBuilder->getDefinitions(); |
|
| 229 | ||
| 230 | foreach ($definitions as $id => $definition) { |
|
| 231 | if ( |
|
| 232 | $id && '.' !== $id[0] |
|
| 233 | && (!$definition->isPublic() || $definition->isPrivate()) |
|
| 234 | && !$definition->getErrors() |
|
| 235 | && !$definition->isAbstract() |
|
| 236 | ) { |
|
| 237 | $definition->setPrivate(false); |
|
| 238 | $definition->setPublic(true); |
|
| 239 | } |
|
| 240 | } |
|
| 241 | ||
| 242 | $aliases = $containerBuilder->getAliases(); |
|
| 243 | foreach ($aliases as $id => $alias) { |
|
| 244 | if ($id && '.' !== $id[0] && (!$alias->isPublic() || $alias->isPrivate())) { |
|
| 245 | while (isset($aliases[$target = (string) $alias])) { |
|
| 246 | $alias = $aliases[$target]; |
|
| 247 | } |
|
| 248 | if ( |
|
| 249 | isset($definitions[$target]) |
|
| 250 | && !$definitions[$target]->getErrors() |
|
| 251 | && !$definitions[$target]->isAbstract() |
|
| 252 | ) { |
|
| 253 | ||
| 254 | $definition->setPrivate(false); |
|
| 255 | $definition->setPublic(true); |
|
| 256 | } |
|
| 257 | } |
|
| 258 | } |
|
| 259 | } |
|
| 260 | } |
|
| 261 | ||