title: Symfony Dependency Injection not triggering load function
body: <p>I'm trying out building my own CMS with the Symfony stack and I'm already in some issues with the Dependency Injection.</p>
  
  <p><strong>What am I trying to do</strong> <br/>
  Load the 'Extension' of each module installed on the CMS, so services and doctrine settings can be merged.</p>
  
  <p><strong>What I am doing</strong><br/>
  Running Symfony Flex ( Symfony 4 ) I have in src/Kernel.php: ( in the configureContainer function)</p>
  
  <pre><code>foreach ($this-&gt;getInstalledModules() as $module) {
      $class = 'App\\Modules\\' . $module . '\\DependencyInjection\\' . $module . 'Extension';
      if (class_exists($class)) {
          $container-&gt;registerExtension(new $class());
      }
  }
  </code></pre>
  
  <p>I have my modules stored in <code>src/Modules/[module_name]</code>, the dependency loader for each module is in <code>src/Modules/[module_name]/DependencyInjection/[module_name]Extension.php</code> with namespace <code>App\Modules\Articles\DependencyInjection</code><br/><br/>
  My extension for a module:</p>
  
  <pre><code>class ArticlesExtension extends Extension implements PrependExtensionInterface
  {
      public function load(array $configs, ContainerBuilder $container)
      {
          die("LOADING");
          $loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__ . '/../Resources/config'));
          $loader-&gt;load('services.yml');
      }
  
      public function prepend(ContainerBuilder $container)
      {
          $loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__ . '/../Resources/config'));
          $loader-&gt;load('doctrine.yml');
      }
  }
  </code></pre>
  
  <p>As you can see I added a <code>die</code> for testing purposes, the issue is that this does not get executed ( with or without the die ). The prepend function though gets executed and is working registering my doctrine entities accordingly.</p>
  
  <p>You can find my repository by visiting this link: <a href="http://lab.cirykpopeye.be/cirykpopeye/Cirykpopeye.be/tree/development" rel="nofollow noreferrer">http://lab.cirykpopeye.be/cirykpopeye/Cirykpopeye.be/tree/development</a></p>