class ResolveClassPass
@author Nicolas Grekas <p@tchwork.com>
Hierarchy
- class \Symfony\Component\DependencyInjection\Compiler\ResolveClassPass implements \Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface
Expanded class hierarchy of ResolveClassPass
File
-
vendor/
symfony/ dependency-injection/ Compiler/ ResolveClassPass.php, line 21
Namespace
Symfony\Component\DependencyInjection\CompilerView source
class ResolveClassPass implements CompilerPassInterface {
public function process(ContainerBuilder $container) : void {
foreach ($container->getDefinitions() as $id => $definition) {
if ($definition->isSynthetic() || null !== $definition->getClass()) {
continue;
}
if (preg_match('/^[a-zA-Z_\\x7f-\\xff][a-zA-Z0-9_\\x7f-\\xff]*+(?:\\\\[a-zA-Z_\\x7f-\\xff][a-zA-Z0-9_\\x7f-\\xff]*+)++$/', $id)) {
if ($definition instanceof ChildDefinition && !class_exists($id)) {
throw new InvalidArgumentException(\sprintf('Service definition "%s" has a parent but no class, and its name looks like an FQCN. Either the class is missing or you want to inherit it from the parent service. To resolve this ambiguity, please rename this service to a non-FQCN (e.g. using dots), or create the missing class.', $id));
}
$definition->setClass($id);
}
}
}
}
Members
Title Sort descending | Modifiers | Object type | Summary | Overriden Title |
---|---|---|---|---|
ResolveClassPass::process | public | function | You can modify the container here before it is dumped to PHP code. | Overrides CompilerPassInterface::process |