Explorar o código

[Foundation] added the env and debug information in the project container class name to avoid potential clashes if you manipulate several container in the same PHP script

Fabien Potencier %!s(int64=15) %!d(string=hai) anos
pai
achega
abe86d2608
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      src/Symfony/Foundation/Kernel.php

+ 1 - 1
src/Symfony/Foundation/Kernel.php

@@ -254,7 +254,7 @@ abstract class Kernel implements HttpKernelInterface, \Serializable
 
     protected function initializeContainer()
     {
-        $class = $this->name.'ProjectContainer';
+        $class = $this->name.ucfirst($this->environment).($this->debug ? 'Debug' : '').'ProjectContainer';
         $location = $this->getCacheDir().'/'.$class;
         $reload = $this->debug ? $this->needsReload($class, $location) : false;