Explorar o código

[DependencyInjection] fixed namespace problem when dumping to PHP

Fabien Potencier %!s(int64=15) %!d(string=hai) anos
pai
achega
0cfdf2cbda

+ 1 - 1
src/Symfony/Components/DependencyInjection/Dumper/PhpDumper.php

@@ -112,7 +112,7 @@ EOF;
     }
     else
     {
-      if ($class != "'".$definition->getClass()."'")
+      if ($class != "'".str_replace('\\', '\\\\', $definition->getClass())."'")
       {
         return sprintf("    \$class = %s;\n    \$instance = new \$class(%s);\n", $class, implode(', ', $arguments));
       }