title: Sf2 Importing bundle services.yml from subdirectory
body: <p>Is there a possibility to import a services.yml file from a subdir in config?</p>
  
  <p>I've got a structure like this:</p>
  
  <pre><code>[Acme/MyBundle/Resources]
  
  --[config]
  
  ----[routing]
  
  ----[services]
  
  ------[User]
  
  --------services.yml
  
  ----[validation]
  
  ----routing.yml
  
  ----services.yml
  
  ----validation.yml
  </code></pre>
  
  <p>Now I want to import a file <code>Acme/MyBundle/Resources/config/services/User/services.yml</code>  into <code>Acme/MyBundle/Resources/config/services.yml</code>, which is loaded in <code>DependencyInjection/AcmeMyExtension</code>. The code in <code>Acme/MyBundle/Resources/config/services.yml</code> is:</p>
  
  <pre><code>imports:
      - { resource: "@AcmeMyBundle/Resources/config/services/User/services.yml" }
  
  services:
      //other services
  </code></pre>
  
  <p>I'm getting error:</p>
  
  <pre><code>Fatal error: Uncaught exception 'InvalidArgumentException' with message 'The file "@AcmeMyBundle/Resources/config/services/User/services.yml" does not exist (in: ., C:\wamp\www\dir\src\Acme\MyBundle\DependencyInjection/../Resources/config).' in C:\wamp\www\dir\app\cache\dev\classes.php:1518 
  Stack trace: #0 C:\wamp\www\dir\vendor\symfony\symfony\src\Symfony\Component\Config\Loader\FileLoader.php(70): Symfony\Component\Config\FileLocator-&gt;locate('@AcmeMyBundle/...', '.', false) #1 C:\wamp\www\dir\vendor\symfony\symfony\src\Symfony\Component\DependencyInjection\Loader\YamlFileLoader.php(97): Symfony\Component\Config\Loader\FileLoader-&gt;import('@AcmeMyBundle/...', NULL, false, 'services.yml') #2 C:\wamp\www\dir\vendor\symfony\symfony\src\Symfony\Component\DependencyInjection\Loader\YamlFileLoader.php(54): Symfony\Component\DependencyInjection\Loader\YamlFileLoader-&gt;parseImports(Array, 'services.yml') #3 C:\wamp\www\dir\src\Acme\MyBundle\DependencyInjection\AcmeMyExtension.php(26): Symfony\Co in C:\wamp\www\dir\vendor\symfony\symfony\src\Symfony\Component\Config\Loader\FileLoader.php on line 100
  </code></pre>
  
  <p>The code of Acme/MyBundle/DependencyInjection/AcmeMyExtension.php:</p>
  
  <pre><code>&lt;?php
  
  namespace Core\MpgBundle\DependencyInjection;
  
  use Symfony\Component\DependencyInjection\ContainerBuilder;
  use Symfony\Component\Config\FileLocator;
  use Symfony\Component\HttpKernel\DependencyInjection\Extension;
  use Symfony\Component\DependencyInjection\Loader;
  
  /**
   * This is the class that loads and manages your bundle configuration
   *
   * To learn more see {@link http://symfony.com/doc/current/cookbook/bundles/extension.html}
   */
  class CoreMpgExtension 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');
      }
  }
  </code></pre>