function ReplaceAliasByActualDefinitionPass::processValue
Overrides AbstractRecursivePass::processValue
File
-
vendor/
symfony/ dependency-injection/ Compiler/ ReplaceAliasByActualDefinitionPass.php, line 90
Class
- ReplaceAliasByActualDefinitionPass
- Replaces aliases with actual service definitions, effectively removing these aliases.
Namespace
Symfony\Component\DependencyInjection\CompilerCode
protected function processValue(mixed $value, bool $isRoot = false) : mixed {
if ($value instanceof Reference && isset($this->replacements[$referenceId = (string) $value])) {
// Perform the replacement
$newId = $this->replacements[$referenceId];
$value = new Reference($newId, $value->getInvalidBehavior());
$this->container
->log($this, \sprintf('Changed reference of service "%s" previously pointing to "%s" to "%s".', $this->currentId, $referenceId, $newId));
}
return parent::processValue($value, $isRoot);
}