2017-11-20 14 views
1

Doctrine Bundle에 문제가 있습니다.Symfony - DoctrineBundle이 애플리케이션에 등록되지 않았습니다.

The DoctrineBundle is not registered in your application.

이 때문에 설정에 이상하다/bundles.php 난이 : 내가 웹 페이지 항목을하려고 할 때 오류가있는

return [ 
    Symfony\Bundle\FrameworkBundle\FrameworkBundle::class => ['all' => true], 
    FOS\RestBundle\FOSRestBundle::class => ['all' => true], 
    JMS\SerializerBundle\JMSSerializerBundle::class => ['all' => true], 
    Sensio\Bundle\FrameworkExtraBundle\SensioFrameworkExtraBundle::class => ['all' => true], 
    Doctrine\Bundle\DoctrineCacheBundle\DoctrineCacheBundle::class => ['all' => true], 
    Doctrine\Bundle\DoctrineBundle\DoctrineBundle::class => ['all' => true], 
]; 

어떻게 응용 프로그램에 대한 교리 번들 avalible 추가? 어쩌면 교리/오옴과도 관련이 있을까요? 도움 주셔서 감사합니다. 내가 services.kernel.bundles의 컨트롤러에서 $이, 덤프 때

편집

난이 :

["DoctrineBundle"]=> 
      object(Doctrine\Bundle\DoctrineBundle\DoctrineBundle)#73 (6) { 
      ["autoloader":"Doctrine\Bundle\DoctrineBundle\DoctrineBundle":private]=> 
      NULL 
      ["name":protected]=> 
      string(14) "DoctrineBundle" 
      ["extension":protected]=> 
      NULL 
      ["path":protected]=> 
      NULL 
      ["namespace":"Symfony\Component\HttpKernel\Bundle\Bundle":private]=> 
      string(30) "Doctrine\Bundle\DoctrineBundle" 
      ["container":protected]=> 
      *RECURSION* 
      } 
     } 
+0

캐시를 지우셨습니까? '''php bin/console 캐시 : clear --no-warmup --env = prod''' –

+0

예, 캐시가 깨끗함 –

+0

@ PiotrŻęgota 해결 했습니까? 나는 standar 3.4와 함께 이것도 만난다. – ihsan

답변

0

이 시도; app/AppKernel.php 파일에 해당 행을 추가하십시오.

new Doctrine\Bundle\DoctrineBundle\DoctrineBundle(),

파일은 것 같습니다.

class AppKernel extends Kernel 
{ 
    public function registerBundles() 
    { 
     $bundles = array(
      new Symfony\Bundle\FrameworkBundle\FrameworkBundle(), 
      new Symfony\Bundle\SecurityBundle\SecurityBundle(), 
      new Symfony\Bundle\TwigBundle\TwigBundle(), 
      new Symfony\Bundle\MonologBundle\MonologBundle(), 
      new Symfony\Bundle\SwiftmailerBundle\SwiftmailerBundle(), 
      new Doctrine\Bundle\DoctrineBundle\DoctrineBundle(), 
      new Sensio\Bundle\FrameworkExtraBundle\SensioFrameworkExtraBundle(), 
      new DashboardBundle\DashboardBundle(), 
      new Doctrine\Bundle\DoctrineCacheBundle\DoctrineCacheBundle(), 
     ); 

     if (in_array($this->getEnvironment(), array('dev', 'test'), true)) { 
      $bundles[] = new Symfony\Bundle\DebugBundle\DebugBundle(); 
      $bundles[] = new Symfony\Bundle\WebProfilerBundle\WebProfilerBundle(); 
      $bundles[] = new Sensio\Bundle\DistributionBundle\SensioDistributionBundle(); 
      $bundles[] = new Sensio\Bundle\GeneratorBundle\SensioGeneratorBundle(); 
     } 

     return $bundles; 
    } 

    public function registerContainerConfiguration(LoaderInterface $loader) 
    { 
     $loader->load($this->getRootDir().'/config/config_'.$this->getEnvironment().'.yml'); 
    } 
} 
+0

나는 그것을 시도한다. 그러나 그것은 어떤 결과도주지 않지만베이스 포스트를 본다. –