namespace Symfony\Component\DependencyInjection\Compiler;
use Symfony\Component\DependencyInjection\Argument\ArgumentInterface;
+use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\ContainerInterface;
use Symfony\Component\DependencyInjection\Definition;
use Symfony\Component\DependencyInjection\Exception\RuntimeException;
use Symfony\Component\DependencyInjection\ExpressionLanguage;
use Symfony\Component\DependencyInjection\Reference;
-use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\ExpressionLanguage\Expression;
/**
private $graph;
private $currentDefinition;
private $onlyConstructorArguments;
+ private $hasProxyDumper;
private $lazy;
private $expressionLanguage;
/**
* @param bool $onlyConstructorArguments Sets this Service Reference pass to ignore method calls
*/
- public function __construct($onlyConstructorArguments = false)
+ public function __construct($onlyConstructorArguments = false, $hasProxyDumper = true)
{
$this->onlyConstructorArguments = (bool) $onlyConstructorArguments;
+ $this->hasProxyDumper = (bool) $hasProxyDumper;
}
/**
$targetId,
$targetDefinition,
$value,
- $this->lazy || ($targetDefinition && $targetDefinition->isLazy()),
+ $this->lazy || ($this->hasProxyDumper && $targetDefinition && $targetDefinition->isLazy()),
ContainerInterface::IGNORE_ON_UNINITIALIZED_REFERENCE === $value->getInvalidBehavior()
);
return $value;
}
$this->currentDefinition = $value;
+ } elseif ($this->currentDefinition === $value) {
+ return $value;
}
$this->lazy = false;