Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

moved the request scope creation to the ContainerAwareHttpKernel class

  • Loading branch information...
commit 550df5a85a64de2c3596fede6225d338c9ab79aa 1 parent 77ec799
@fabpot fabpot authored
View
3  src/Symfony/Bundle/FrameworkBundle/FrameworkBundle.php
@@ -28,7 +28,6 @@
use Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\FragmentRendererPass;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Compiler\PassConfig;
-use Symfony\Component\DependencyInjection\Scope;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpKernel\Bundle\Bundle;
@@ -56,8 +55,6 @@ public function build(ContainerBuilder $container)
{
parent::build($container);
- $container->addScope(new Scope('request'));
-
$container->addCompilerPass(new RoutingResolverPass());
$container->addCompilerPass(new ProfilerPass());
$container->addCompilerPass(new RegisterKernelListenersPass(), PassConfig::TYPE_AFTER_REMOVING);
View
4 src/Symfony/Component/HttpKernel/DependencyInjection/ContainerAwareHttpKernel.php
@@ -18,9 +18,10 @@
use Symfony\Component\HttpKernel\Controller\ControllerResolverInterface;
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
use Symfony\Component\DependencyInjection\ContainerInterface;
+use Symfony\Component\DependencyInjection\Scope;
/**
- * This HttpKernel is used to manage scope changes of the DI container.
+ * Adds a managed request scope.
*
* @author Fabien Potencier <fabien@symfony.com>
* @author Johannes M. Schmitt <schmittjoh@gmail.com>
@@ -41,6 +42,7 @@ public function __construct(EventDispatcherInterface $dispatcher, ContainerInter
parent::__construct($dispatcher, $controllerResolver);
$this->container = $container;
+ $container->addScope(new Scope('request'));
}
/**
Please sign in to comment.
Something went wrong with that request. Please try again.