[DependencyInjection] PhpDumper, fixes #2730

This commit is contained in:
digitalkaoz 2012-01-06 21:20:08 +01:00
parent 3e9d937eb8
commit 9441c46bb6
3 changed files with 5 additions and 3 deletions

View File

@ -648,6 +648,8 @@ EOF;
*/
private function addConstructor()
{
$arguments = $this->container->getParameterBag()->all() ? 'new ParameterBag($this->getDefaultParameters())' : null;
$code = <<<EOF
/**
@ -655,7 +657,7 @@ EOF;
*/
public function __construct()
{
parent::__construct(new ParameterBag(\$this->getDefaultParameters()));
parent::__construct($arguments);
EOF;

View File

@ -20,6 +20,6 @@ class Container extends AbstractContainer
*/
public function __construct()
{
parent::__construct(new ParameterBag($this->getDefaultParameters()));
parent::__construct();
}
}

View File

@ -20,6 +20,6 @@ class ProjectServiceContainer extends Container
*/
public function __construct()
{
parent::__construct(new ParameterBag($this->getDefaultParameters()));
parent::__construct();
}
}