title: Symfony 2.5 "You have requested a non-existent service "siteTest.b"
body: <p>When run workspace/app_dev.php, no problem. But when I try to run workspace/app.php I get:</p>
  
  <blockquote>
    <p>"You have requested a non-existent service "siteTest.b"</p>
  </blockquote>
  
  <p>I dont have the first clue what am I doing wrong.</p>
  
  <p><strong>app/config/config.yml :</strong></p>
  
  <pre><code>imports:
      - { resource: parameters.yml }
      - { resource: security.yml }
  framework:
      secret:          "%secret%"
      router:
          resource: "%kernel.root_dir%/config/routing.yml"
          strict_requirements: ~
      form:            ~
      csrf_protection: ~
      validation:      { enable_annotations: true }
      templating:
          engines: ['twig']
      default_locale:  "%locale%"
      trusted_hosts:   ~
      trusted_proxies: ~
      session:
          handler_id:  ~
      fragments:       ~
      http_method_override: true
  </code></pre>
  
  <p><strong>src/Site/TestBundle/Resources/config/services.yml:</strong></p>
  
  <pre><code>parameters:
      siteTest.aa: Site\TestBundle\Controller\a
  
  services:
      siteTest.b:
          class: %siteTest.aa%
  </code></pre>
  
  <p><strong>src/Site/TestBundle/DependencyInjection/SiteTestExtension.php :</strong></p>
  
  <pre><code>namespace Site\TestBundle\DependencyInjection;
  
  use Symfony\Component\DependencyInjection\ContainerBuilder;
  use Symfony\Component\Config\FileLocator;
  use Symfony\Component\HttpKernel\DependencyInjection\Extension;
  use Symfony\Component\DependencyInjection\Loader;
  class SiteTestExtension 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>
  
  <p><strong>src/Site/TestBundle/Controller/a.php :</strong></p>
  
  <pre><code>namespace Site\TestBundle\Controller;
  class a {
      public function printTest() {
          var_dump('Test');
          exit;
      }
  }
  </code></pre>
  
  <p><strong>src/Site/TestBundle/Controller/DefaultController.php:</strong></p>
  
  <pre><code>namespace Site\TestBundle\Controller;
  
  use Symfony\Bundle\FrameworkBundle\Controller\Controller;
  use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
  use Symfony\Component\HttpFoundation\Response;
  
  class DefaultController extends Controller
  {
      public function indexAction()
      {
          $aaa = $this-&gt;get('siteTest.b');
          exit();
      }
  }
  </code></pre>