// Repeat if services have been removed.
} while ($has_changed);
// Remove aliases to services that have been removed. This does not need to
// be part of the loop above because references to aliases have already been
// resolved by Symfony's ResolveReferencesToAliasesPass.
if ($process_aliases) { foreach ($container->
getAliases() as $key =>
$alias) { $id =
(string) $alias;
if (!
$container->
has($id)) { $container->
removeAlias($key);
$container->
log($this,
sprintf('Removed alias "%s"; reason: alias to non-existent service "%s".',
$key,
$id));
} } } } /**
* Checks if a reference argument is to a missing service.
*
* @param mixed $argument
* The argument to check.
* @param \Symfony\Component\DependencyInjection\ContainerBuilder $container
* The container.
*
* @return bool
* TRUE if the argument is a reference to a service that is missing from the
* container and the reference is required, FALSE if not.
*/