title: How to load, process and use custom parameters from Yaml configuration files in DI Extension class?
body: <p>I'm trying to import a yaml configuration file in my App following the documentation provided here <a href="http://symfony.com/doc/current/bundles/extension.html" rel="nofollow noreferrer">http://symfony.com/doc/current/bundles/extension.html</a> but I always have the error message: </p>
  
  <blockquote>
    <p>There is no extension able to load the configuration for "app"</p>
  </blockquote>
  
  <p>My file is located here : <strong>config/packages/app.yaml</strong> and has the following structure :  </p>
  
  <pre><code>app:  
      list:  
          model1:  
              prop1: value1
              prop2: value2  
          model2:
              ...
  </code></pre>
  
  <p>As this is a simple App, all the files are in <code>src/</code>. So I have <strong>src/DependencyInjection/AppExtension.php</strong></p>
  
  <pre><code>&lt;?php
  
  namespace App\DependencyInjection;
  
  use Symfony\Component\DependencyInjection\ContainerBuilder;
  use Symfony\Component\Config\FileLocator;
  use Symfony\Component\HttpKernel\DependencyInjection\Extension;
  use Symfony\Component\DependencyInjection\Loader;
  
  class AppExtension extends Extension
  {
      public function load(array $configs, ContainerBuilder $container)
      {
          $configuration = new Configuration();
          $config = $this-&gt;processConfiguration($configuration, $configs);
      }
  }
  </code></pre>
  
  <p>And <strong>src/DependencyInjection/Configuration.php</strong>  </p>
  
  <pre><code>&lt;?php
  
  namespace App\DependencyInjection;
  
  use Symfony\Component\Config\Definition\Builder\TreeBuilder;
  use Symfony\Component\Config\Definition\ConfigurationInterface;
  
  class Configuration implements ConfigurationInterface
  {
      public function getConfigTreeBuilder()
      {
          $treeBuilder = new TreeBuilder();
          $rootNode = $treeBuilder-&gt;root('app');
  
          // Node definition
          $rootNode
              -&gt;children()
                  -&gt;arrayNode('list')
                      -&gt;useAttributeAsKey('name')
                      -&gt;requiresAtLeastOneElement()
                      -&gt;prototype('array')
                          -&gt;children()
                              -&gt;requiresAtLeastOneElement()
                              -&gt;prototype('scalar')
                              -&gt;end()
                          -&gt;end()
                      -&gt;end()
                  -&gt;end()
              -&gt;end();
  
          return $treeBuilder;
      }
  }
  </code></pre>
  
  <p>I'm not able to access my parameters :(<br>
  Any idea?</p>