Преглед на файлове

Made namespace for Doctrine cache unique to each environment

Solves issues with the cache not being valid for the DBAL ACL provider using D2 as the cache and switching environments.

An exception has been thrown during the rendering of a template ("Warning: Illegal offset type in isset or empty in ../vendor/symfony/src/Symfony/Component/Security/Acl/Dbal/AclProvider.php line 404")
Geoffrey Tran преди 14 години
родител
ревизия
91cfb24e40
променени са 1 файла, в които са добавени 1 реда и са изтрити 1 реда
  1. 1 1
      src/Symfony/Bundle/DoctrineBundle/DependencyInjection/DoctrineExtension.php

+ 1 - 1
src/Symfony/Bundle/DoctrineBundle/DependencyInjection/DoctrineExtension.php

@@ -389,7 +389,7 @@ class DoctrineExtension extends AbstractDoctrineExtension
 
         $cacheDef->setPublic(false);
         // generate a unique namespace for the given application
-        $namespace = 'sf2orm_'.$entityManager['name'].'_'.md5($container->getParameter('kernel.root_dir'));
+        $namespace = 'sf2orm_'.$entityManager['name'].'_'.md5($container->getParameter('kernel.root_dir').$container->getParameter('kernel.environment'));
         $cacheDef->addMethodCall('setNamespace', array($namespace));
 
         return $cacheDef;