title: Symfony2: There is no extension able to load the configuration for
body: <p>I am building an extension to load config files from all installed bundles.</p>
  <p>my Extension looks like this:</p>
  <pre><code>namespace Acme\MenuBundle\DependencyInjection;
  // use ...
  use Acme\MenuBundle\DependencyInjection\Configuration;
  
  class AcmeMenuExtension extends Extension {
      public function load(array $configs, ContainerBuilder $container) {
  
          $configuration = new Configuration();
          $config = $this-&gt;processConfiguration($configuration, $configs);
  
          $finder = new \Symfony\Component\Finder\Finder();
          $finder
              -&gt;directories()
              -&gt;in($container-&gt;getParameter('kernel.root_dir') . '/../src/*/*Bundle/Resources')
              -&gt;path('config');
  
          $possibleLocations = array();
          foreach ($finder as $c_dir) {
              $possibleLocations[] = $c_dir-&gt;getPathName();
          }
           
          $loader = new Loader\YamlFileLoader($container, new FileLocator($possibleLocations));
          $loader-&gt;load('menu.yml');
      }
  }
  </code></pre>
  <p>And then there is my (very simple) Configuration class: I will add a more complex tree in the future, but for now I want it to work with this:</p>
  <pre><code>namespace Acme\MenuBundle\DependencyInjection;
  // use ...
  
  class Configuration implements ConfigurationInterface {  
      public function getConfigTreeBuilder() {
          $treeBuilder = new TreeBuilder();
          $rootNode = $treeBuilder-&gt;root('mw_menu'); 
  
          $rootNode
              -&gt;children()
                  -&gt;scalarNode('mw_menu')-&gt;defaultValue('')-&gt;end()
              -&gt;end(); 
  
          return $treeBuilder;
      }
  }
  </code></pre>
  <p>For testing I only placed a &quot;menu.yml&quot; file inside the current MenuBundle\Resources\config with this content:</p>
  <pre><code># file: src\Acme\MenuBundle\Resource\config\menu.yml
  mw_menu: &quot;some teststring&quot;
  </code></pre>
  <p>For manual testing I use a testAction in a default Controller, which does actually nothing but render an empty template.</p>
  <p>Anyway, I get this error:</p>
  <pre><code>InvalidArgumentException: There is no extension able to load the configuration for     
  &quot;mw_menu&quot; (in {path to symfony}/app/../src/Acme/MenuBundle/Resources\config\menu.yml).
  Looked for namespace &quot;mw_menu&quot;, found none
  </code></pre>
  <p><strong>How can I fix that?</strong></p>
  <p>From what I currently understand, Symfony notices the key 'mw_menu' in the config file, but is not able to find the matching configuration.</p>
  <p>I worked along the cookbook article: <a href="http://symfony.com/doc/master/cookbook/bundles/extension.html" rel="nofollow noreferrer">How to expose a semantic configuration?</a></p>
  <p>Please note: I know of Knp Menu Bundle and similar Bundles but I do want to implement a menu myself.</p>
  <p>Additionally I found <a href="https://groups.google.com/forum/?fromgroups=#!topic/symfony-users/GX2X_yOOj3g" rel="nofollow noreferrer">this</a> notice. Is he right?</p>