title: Symfony custom configuration - namespace issue
body: <p>Following the advice posted at <a href="https://stackoverflow.com/questions/31765136/loading-custom-config-file-for-app-in-symfony2">Loading custom config file for app in symfony2</a> I stucked into namespace issue.</p>
  
  <p>In <code>\src\AppBundle\DependencyInjection</code> I have two files:</p>
  
  <p><strong>AppExtension.php:</strong></p>
  
  <pre><code>&lt;?php
  namespace AppBundle\DependencyInjection;
  
  use Symfony\Component\DependencyInjection\ContainerBuilder;
  use Symfony\Component\Config\FileLocator;
  use Symfony\Component\DependencyInjection\Extension\PrependExtensionInterface;
  use Symfony\Component\HttpKernel\DependencyInjection\Extension;
  use Symfony\Component\DependencyInjection\Loader;
  use Symfony\Component\Validator\Tests\Fixtures\Entity;
  use AppBundle\DependencyInjection\Configuration;
  
  /**
   * This is the class that loads and manages your bundle configuration
   */
  class AppExtension extends Extension
  {
      /**
       * {@inheritdoc}
       */
      public function load(array $configs, ContainerBuilder $container)
      {
          $configuration = new Configuration();
          $config = $this-&gt;processConfiguration($configuration, $configs);
  
          $container-&gt;setParameter('kh', $config['kh']);
  
          $loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config'));
          $loader-&gt;load('general.yml'); # another file of yours
  
      }
  }
  </code></pre>
  
  <p>and <strong>Configuration.php</strong>:</p>
  
  <pre><code>&lt;?
  namespace AppBundle\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('kh');
  
           $rootNode
              -&gt;children()
              -&gt;arrayNode('tags')
              -&gt;prototype('array')
                  -&gt;children()
                      -&gt;scalarNode('name')-&gt;isRequired()-&gt;end();
                      -&gt;scalarNode('role')-&gt;isRequired()-&gt;end();
                      -&gt;scalarNode('priority')-&gt;isRequired()-&gt;end();
                      -&gt;scalarNode('label')-&gt;isRequired()-&gt;end();
                  -&gt;end();
              -&gt;end();
          -&gt;end();
  
          return $treeBuilder;
      }
  }
  </code></pre>
  
  <p>It seems that I make some kind of mistake naming the files as executing:</p>
  
  <pre><code>php app/console cache:clear --env=prod
  </code></pre>
  
  <p>results in:</p>
  
  <blockquote>
    <p>PHP Fatal error:  Class 'AppBundle\DependencyInjection\Configuration' not found in /var/www/dev.investmentopportunities.pl/src/AppBundle/DependencyInjection/AppExtension.php on line 22
        [2015-08-02 10:39:36] php.EMERGENCY: Fatal Error: Class 'AppBundle\DependencyInjection\Configuration' not found {"type":1,"file":"/var/www/dev.investmentopportunities.pl/src/AppBundle/DependencyInjection/AppExtension.php","line":22,"level":6143,"stack":[]}</p>
  </blockquote>
  
  <p>Unluckily I have a problem with finding the error on my own. I have tried to rename files but still the error occurs. Could you please advice what am I doing wrong? </p>
  
  <p><strong>UPDATE 1:</strong></p>
  
  <p>As sugested by @San Thapa I have tried also to remove "use" command. This results in:</p>
  
  <blockquote>
    <p>PHP Fatal error:  Class 'AppBundle\DependencyInjection\Configuration' not found in /var/www/dev.investmentopportunities.pl/src/AppBundle/DependencyInjection/AppExtension.php on line 21
        [2015-08-02 12:05:27] php.EMERGENCY: Fatal Error: Class 'AppBundle\DependencyInjection\Configuration' not found {"type":1,"file":"/var/www/dev.investmentopportunities.pl/src/AppBundle/DependencyInjection/AppExtension.php","line":21,"level":6143,"stack":[]}</p>
    
    <p>[Symfony\Component\Debug\Exception\ClassNotFoundException]
      Attempted to load class "Configuration" from namespace "AppBundle\Dependenc
      yInjection".
      Did you forget a "use" statement for e.g. "Symfony\Bundle\TwigBundle\Depend
      encyInjection\Configuration", "Symfony\Bundle\DebugBundle\DependencyInjecti
      on\Configuration", "Symfony\Bundle\WebProfilerBundle\DependencyInjection\Co
      nfiguration", "Symfony\Bundle\FrameworkBundle\Tests\Functional\Bundle\TestB
      undle\DependencyInjection\Configuration", "Symfony\Bundle\FrameworkBundle\D
      ependencyInjection\Configuration", "Genemu\Bundle\FormBundle\DependencyInje
      ction\Configuration", "Doctrine\ORM\Configuration", "Doctrine\DBAL\Configur
      ation", "Doctrine\Bundle\DoctrineCacheBundle\DependencyInjection\Configurat
      ion", "Symfony\Bundle\SwiftmailerBundle\DependencyInjection\Configuration",
       "Symfony\Bundle\MonologBundle\DependencyInjection\Configuration", "Symfony
      \Bundle\AsseticBundle\DependencyInjection\Configuration", "Sensio\Bundle\Fr
      ameworkExtraBundle\DependencyInjection\Configuration", "PUGX\AutocompleterB
      undle\DependencyInjection\Configuration", "Knp\Bundle\PaginatorBundle\Depen
      dencyInjection\Configuration", "FOS\UserBundle\DependencyInjection\Configur
      ation" or "Doctrine\Bundle\DoctrineBundle\DependencyInjection\Configuration
      "?</p>
  </blockquote>
  
  <p>What seems a bit strange acessing the webpage from browser does not result in any error. </p>