Przeglądaj źródła

Resource paths should use the full bundle name (with the 'Bundle' postfix)

Victor Berchet 14 lat temu
rodzic
commit
8b7c857ef3

+ 1 - 1
src/Symfony/Bundle/FrameworkBundle/CacheWarmer/TemplatePathsCacheWarmer.php

@@ -51,7 +51,7 @@ class TemplatePathsCacheWarmer extends CacheWarmer
         $templates = array();
 
         foreach ($this->kernel->getBundles() as $name => $bundle) {
-            $templates += $this->findTemplatesIn($this->rootDir.'/'.$name.'/views', $name);
+            $templates += $this->findTemplatesIn($this->rootDir.'/'.$name.'Bundle/views', $name);
             $templates += $this->findTemplatesIn($bundle->getPath().'/Resources/views', $name);
         }
 

+ 1 - 1
src/Symfony/Component/HttpKernel/Kernel.php

@@ -239,7 +239,7 @@ abstract class Kernel implements KernelInterface
         $isResource = 0 === strpos($path, 'Resources');
 
         $files = array();
-        if (true === $isResource && null !== $dir && file_exists($file = $dir.'/'.$bundle.'/'.substr($path, 10))) {
+        if (true === $isResource && null !== $dir && file_exists($file = $dir.'/'.$bundle.'Bundle/'.substr($path, 10))) {
             if ($first) {
                 return $file;
             }