Update to Drupal 8.1.0. For more information, see https://www.drupal.org/drupal-8.1.0-release-notes
This commit is contained in:
parent
b11a755ba8
commit
c0a0d5a94c
6920 changed files with 64395 additions and 57312 deletions
|
@ -12,6 +12,7 @@
|
|||
namespace Symfony\Component\DependencyInjection\Compiler;
|
||||
|
||||
use Symfony\Component\DependencyInjection\Alias;
|
||||
use Symfony\Component\DependencyInjection\Definition;
|
||||
use Symfony\Component\DependencyInjection\Exception\ServiceCircularReferenceException;
|
||||
use Symfony\Component\DependencyInjection\Reference;
|
||||
use Symfony\Component\DependencyInjection\ContainerBuilder;
|
||||
|
@ -42,6 +43,8 @@ class ResolveReferencesToAliasesPass implements CompilerPassInterface
|
|||
$definition->setArguments($this->processArguments($definition->getArguments()));
|
||||
$definition->setMethodCalls($this->processArguments($definition->getMethodCalls()));
|
||||
$definition->setProperties($this->processArguments($definition->getProperties()));
|
||||
$definition->setFactory($this->processFactory($definition->getFactory()));
|
||||
$definition->setFactoryService($this->processFactoryService($definition->getFactoryService(false)), false);
|
||||
}
|
||||
|
||||
foreach ($container->getAliases() as $id => $alias) {
|
||||
|
@ -68,7 +71,7 @@ class ResolveReferencesToAliasesPass implements CompilerPassInterface
|
|||
$defId = $this->getDefinitionId($id = (string) $argument);
|
||||
|
||||
if ($defId !== $id) {
|
||||
$arguments[$k] = new Reference($defId, $argument->getInvalidBehavior(), $argument->isStrict());
|
||||
$arguments[$k] = new Reference($defId, $argument->getInvalidBehavior(), $argument->isStrict(false));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -76,6 +79,30 @@ class ResolveReferencesToAliasesPass implements CompilerPassInterface
|
|||
return $arguments;
|
||||
}
|
||||
|
||||
private function processFactoryService($factoryService)
|
||||
{
|
||||
if (null === $factoryService) {
|
||||
return;
|
||||
}
|
||||
|
||||
return $this->getDefinitionId($factoryService);
|
||||
}
|
||||
|
||||
private function processFactory($factory)
|
||||
{
|
||||
if (null === $factory || !is_array($factory) || !$factory[0] instanceof Reference) {
|
||||
return $factory;
|
||||
}
|
||||
|
||||
$defId = $this->getDefinitionId($id = (string) $factory[0]);
|
||||
|
||||
if ($defId !== $id) {
|
||||
$factory[0] = new Reference($defId, $factory[0]->getInvalidBehavior(), $factory[0]->isStrict(false));
|
||||
}
|
||||
|
||||
return $factory;
|
||||
}
|
||||
|
||||
/**
|
||||
* Resolves an alias into a definition id.
|
||||
*
|
||||
|
|
Reference in a new issue