title: ServiceNotFoundException in CheckExceptionOnInvalidReferenceBehaviorPass.php line 58
body: <p>I recently started learning symfony 2.8 and trying to set up my 1st page on local host. However after configuring my bundle based on this tutorial: <a href="https://www.youtube.com/watch?v=S9aQxvEAdcE&amp;list=PLp9j56Yo8a6aWJhLyggonvP7b8vIcYn5Q&amp;index=3" rel="nofollow">https://www.youtube.com/watch?v=S9aQxvEAdcE&amp;list=PLp9j56Yo8a6aWJhLyggonvP7b8vIcYn5Q&amp;index=3</a></p>
  
  <p>i get this error : </p>
  
  <pre><code>ServiceNotFoundException in CheckExceptionOnInvalidReferenceBehaviorPass.php line 58:
  The service "doctrine.orm.layout_entity_manager" has a dependency on a non-existent service "doctrine.orm.quote_strategy.layout".
  </code></pre>
  
  <p>when trying to open my page with adress localhost/st/web/app_dev.php</p>
  
  <p>The reason I am asking this is that couldnt find anything about this particular problem and have no idea what these services is about. If anyone have any clue what I am doing wrong or why this error occurs please share those with me. I am not adding any code because I am not quite sure which files could be the reason of this error. Thanks in advance </p>
  
  <p>EDITED : </p>
  
  <p>I am creating new symfony project using php storm located in <code>C:\wamp64\www\st</code> (enabled symfony plugin and command line tool)</p>
  
  <p>then generating a bundle called MainBundle </p>
  
  <p>I rename <code>DefaultController.php</code> in <code>MainBundle/Controller</code> to <code>MainController.php</code> and change class within it to <code>MainController</code>.
  Then rename default folder in <code>app/Resources/views</code> to <code>layout</code>, as well as <code>base.html.twig</code> to <code>layout.html.twig</code> 
  Then filling a twig files with boostrap template </p>
  
  <p>Then change MainController.php into this :</p>
  
  <pre><code>&lt;?php
  
  namespace MainBundle\Controller;
  
  use Symfony\Bundle\FrameworkBundle\Controller\Controller;
  use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
  
  class MainController extends Controller
  {
      /**
       * @Route ("/", name="home")
       */
      public function indexAction()
      {
          return $this-&gt;render('MainBundle:Default:home.html.twig');
      }
  }
  </code></pre>
  
  <p>then in <code>src/Resource/views/Defaul</code>t change <code>index.html.twig</code> into <code>home.html.twig</code></p>
  
  <p><code>src/MainBundle/Resources/config/routing.yml</code> fill like this : </p>
  
  <pre><code>main:
      resource: "@MainBundle/Controller/MainController.php"
      prefix:     /
      type: annotation
  </code></pre>
  
  <p>Adding github project link <a href="https://github.com/marras1/st" rel="nofollow">https://github.com/marras1/st</a></p>