소스 검색

[DependencyInjection] Fixed a frozen constructor of a container with no parameters

hidenorigoto 12 년 전
부모
커밋
1a4a4ee93c
1개의 변경된 파일7개의 추가작업 그리고 1개의 파일을 삭제
  1. 7 1
      src/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php

+ 7 - 1
src/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php

@@ -689,7 +689,13 @@ EOF;
      */
     public function __construct()
     {
-        \$this->parameters = \$this->getDefaultParameters();
+EOF;
+
+        if ($this->container->getParameterBag()->all()) {
+            $code .= "\n        \$this->parameters = \$this->getDefaultParameters();\n";
+        }
+
+        $code .= <<<EOF
 
         \$this->services =
         \$this->scopedServices =