function RemoveUnusedDefinitionsPass::processValue
Overrides AbstractRecursivePass::processValue
1 call to RemoveUnusedDefinitionsPass::processValue()
- RemoveUnusedDefinitionsPass::process in vendor/
symfony/ dependency-injection/ Compiler/ RemoveUnusedDefinitionsPass.php - Processes the ContainerBuilder to remove unused definitions.
File
-
vendor/
symfony/ dependency-injection/ Compiler/ RemoveUnusedDefinitionsPass.php, line 77
Class
- RemoveUnusedDefinitionsPass
- Removes unused service definitions from the container.
Namespace
Symfony\Component\DependencyInjection\CompilerCode
protected function processValue(mixed $value, bool $isRoot = false) : mixed {
if (!$value instanceof Reference) {
return parent::processValue($value, $isRoot);
}
if (ContainerBuilder::IGNORE_ON_UNINITIALIZED_REFERENCE !== $value->getInvalidBehavior()) {
$this->connectedIds[] = (string) $value;
}
return $value;
}