I updated symfony 2.8 from 2.7.7 and I get this fatigue:
The Symfony \ Component \ DependencyInjection \ Container :: isScopeActive method has been deprecated since version 2.8 and will be removed in version 3.0.
I use this call in the twig extension class:
class TemplateHelper extends \Twig_Extension { private $request; private $container; public function __construct(ContainerInterface $container){ $this->container = $container; if( $this->container->isScopeActive('request') ){ $this->request = $this->container->get('request'); } }
First, I remove the isScopeActive check, but I get an exception when I run symfony cache:
[Symfony \ Component \ dependency injection \ Exception \ InactiveScopeException] You cannot create a service ("request") of an inactive area ("Request").
Is there a way to replace isScopeActive validation?
Thanks...
source share