title: Symfony 2 loading custom configuration file
body: <p>I want to add a new configuration file in Bundle/Resources/config. I've tried following <a href="http://symfony.com/doc/current/cookbook/bundles/extension.html">http://symfony.com/doc/current/cookbook/bundles/extension.html</a> , but it doesn't work as it should and I get</p>
  
  <blockquote>
    <p>There is no extension able to load the configuration for
    "mailbroker_mail_details"</p>
  </blockquote>
  
  <p>My files:</p>
  
  <p>MailbrokerMailDetailsExtension.php</p>
  
  <pre><code>&lt;?php
  
  namespace Mailbroker\MailDetailsBundle\DependencyInjection;
  
  use Symfony\Component\DependencyInjection\ContainerBuilder;
  use Symfony\Component\Config\FileLocator;
  use Symfony\Component\HttpKernel\DependencyInjection\Extension;
  use Symfony\Component\DependencyInjection\Loader;
  
  class MailbrokerMailDetailsExtension extends Extension
  {
      /**
       * {@inheritDoc}
       */
      public function load(array $configs, ContainerBuilder $container)
      {
          $configuration = new Configuration();
          $config = $this-&gt;processConfiguration($configuration, $configs);
  
          $loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config'));
          $loader-&gt;load('services.yml');
          $loader-&gt;load('canonisers.yml');
      }
  
      public function getAlias()
      {
          return 'mailbroker_mail_details';
      }
  }
  </code></pre>
  
  <p>Configuration.php</p>
  
  <pre><code>&lt;?php
  
  namespace Mailbroker\MailDetailsBundle\DependencyInjection;
  
  use Symfony\Component\Config\Definition\Builder\TreeBuilder;
  use Symfony\Component\Config\Definition\ConfigurationInterface;
  
  class Configuration implements ConfigurationInterface
  {
      /**
       * {@inheritDoc}
       */
      public function getConfigTreeBuilder()
      {
          $treeBuilder = new TreeBuilder();
          $rootNode = $treeBuilder-&gt;root('mailbroker_mail_details');
  
          $rootNode
              -&gt;children()
                  -&gt;scalarNode('abc')-&gt;end()
              -&gt;end()
          ;
  
          return $treeBuilder;
      }
  }
  </code></pre>
  
  <p>canonisers.yml</p>
  
  <pre><code>mailbroker_mail_details:
      abc: 123
  </code></pre>
  
  <p>The Configuration is correct (when placed in app/config/config.yml it loads as it should), canonisers.yml is loaded correctly, but for some reason I can't make it work together. Thanks for your help!</p>