function ResolveNoPreloadPass::processValue
Overrides AbstractRecursivePass::processValue
1 call to ResolveNoPreloadPass::processValue()
- ResolveNoPreloadPass::process in vendor/
symfony/ dependency-injection/ Compiler/ ResolveNoPreloadPass.php - You can modify the container here before it is dumped to PHP code.
File
-
vendor/
symfony/ dependency-injection/ Compiler/ ResolveNoPreloadPass.php, line 63
Class
- ResolveNoPreloadPass
- Propagate the "container.no_preload" tag.
Namespace
Symfony\Component\DependencyInjection\CompilerCode
protected function processValue(mixed $value, bool $isRoot = false) : mixed {
if ($value instanceof Reference && ContainerBuilder::IGNORE_ON_UNINITIALIZED_REFERENCE !== $value->getInvalidBehavior() && $this->container
->hasDefinition($id = (string) $value)) {
$definition = $this->container
->getDefinition($id);
if (!isset($this->resolvedIds[$id]) && (!$definition->isPublic() || $definition->isPrivate())) {
$this->resolvedIds[$id] = true;
$this->processValue($definition, true);
}
return $value;
}
if (!$value instanceof Definition) {
return parent::processValue($value, $isRoot);
}
if ($value->hasTag('container.no_preload') || $value->isDeprecated() || $value->hasErrors()) {
return $value;
}
if ($isRoot) {
$value->addTag(self::DO_PRELOAD_TAG);
}
return parent::processValue($value, $isRoot);
}