浏览代码

[FrameworkBundle] removed hardcoded AppKernel class name

Fabien Potencier 14 年之前
父节点
当前提交
00d47889a2
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. 2 1
      src/Symfony/Bundle/FrameworkBundle/Command/CacheWarmupCommand.php

+ 2 - 1
src/Symfony/Bundle/FrameworkBundle/Command/CacheWarmupCommand.php

@@ -67,7 +67,8 @@ EOF
         if (!$this->cacheDir) {
             $this->warmUp($this->container);
         } else {
-            $this->kernelTmp = new \AppKernel(
+            $class = get_class($this->container->get('kernel'));
+            $this->kernelTmp = new $class(
                 $this->container->getParameter('kernel.environment'),
                 $this->container->getParameter('kernel.debug'),
                 $this->cacheDir