소스 검색

[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