Skip to content

Commit 238c9d1

Browse files
Merge branch '3.2' into 3.3
* 3.2: typo [EventDispatcher] Fix ContainerAwareEventDispatcher::hasListeners(null) Use namespaced Twig
2 parents 5042886 + f8ba338 commit 238c9d1

File tree

4 files changed

+7
-6
lines changed

4 files changed

+7
-6
lines changed

Controller/AbstractController.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
use Symfony\Component\Security\Csrf\CsrfTokenManagerInterface;
2626
use Symfony\Component\Serializer\SerializerInterface;
2727
use Symfony\Component\Templating\EngineInterface;
28+
use Twig\Environment;
2829

2930
/**
3031
* Provides common features needed in controllers.
@@ -59,7 +60,7 @@ public static function getSubscribedServices()
5960
'session' => '?'.SessionInterface::class,
6061
'security.authorization_checker' => '?'.AuthorizationCheckerInterface::class,
6162
'templating' => '?'.EngineInterface::class,
62-
'twig' => '?'.\Twig_Environment::class,
63+
'twig' => '?'.Environment::class,
6364
'doctrine' => '?'.ManagerRegistry::class,
6465
'form.factory' => '?'.FormFactoryInterface::class,
6566
'security.token_storage' => '?'.TokenStorageInterface::class,

Tests/Controller/ControllerTraitTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,7 @@ public function testdenyAccessUnlessGranted()
317317

318318
public function testRenderViewTwig()
319319
{
320-
$twig = $this->getMockBuilder('\Twig_Environment')->disableOriginalConstructor()->getMock();
320+
$twig = $this->getMockBuilder('Twig\Environment')->disableOriginalConstructor()->getMock();
321321
$twig->expects($this->once())->method('render')->willReturn('bar');
322322

323323
$container = new Container();
@@ -331,7 +331,7 @@ public function testRenderViewTwig()
331331

332332
public function testRenderTwig()
333333
{
334-
$twig = $this->getMockBuilder('\Twig_Environment')->disableOriginalConstructor()->getMock();
334+
$twig = $this->getMockBuilder('Twig\Environment')->disableOriginalConstructor()->getMock();
335335
$twig->expects($this->once())->method('render')->willReturn('bar');
336336

337337
$container = new Container();
@@ -345,7 +345,7 @@ public function testRenderTwig()
345345

346346
public function testStreamTwig()
347347
{
348-
$twig = $this->getMockBuilder('\Twig_Environment')->disableOriginalConstructor()->getMock();
348+
$twig = $this->getMockBuilder('Twig\Environment')->disableOriginalConstructor()->getMock();
349349

350350
$container = new Container();
351351
$container->set('twig', $twig);

Tests/Controller/TemplateControllerTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ class TemplateControllerTest extends TestCase
2222
{
2323
public function testTwig()
2424
{
25-
$twig = $this->getMockBuilder('\Twig_Environment')->disableOriginalConstructor()->getMock();
25+
$twig = $this->getMockBuilder('Twig\Environment')->disableOriginalConstructor()->getMock();
2626
$twig->expects($this->once())->method('render')->willReturn('bar');
2727

2828
$container = $this->getMockBuilder('Symfony\Component\DependencyInjection\ContainerInterface')->getMock();

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656
"symfony/web-link": "~3.3",
5757
"doctrine/annotations": "~1.0",
5858
"phpdocumentor/reflection-docblock": "^3.0",
59-
"twig/twig": "~1.26|~2.0",
59+
"twig/twig": "~1.34|~2.4",
6060
"sensio/framework-extra-bundle": "^3.0.2"
6161
},
6262
"conflict": {

0 commit comments

Comments
 (0)