File tree Expand file tree Collapse file tree 4 files changed +7
-6
lines changed Expand file tree Collapse file tree 4 files changed +7
-6
lines changed Original file line number Diff line number Diff line change 25
25
use Symfony \Component \Security \Csrf \CsrfTokenManagerInterface ;
26
26
use Symfony \Component \Serializer \SerializerInterface ;
27
27
use Symfony \Component \Templating \EngineInterface ;
28
+ use Twig \Environment ;
28
29
29
30
/**
30
31
* Provides common features needed in controllers.
@@ -59,7 +60,7 @@ public static function getSubscribedServices()
59
60
'session ' => '? ' .SessionInterface::class,
60
61
'security.authorization_checker ' => '? ' .AuthorizationCheckerInterface::class,
61
62
'templating ' => '? ' .EngineInterface::class,
62
- 'twig ' => '? ' .\Twig_Environment ::class,
63
+ 'twig ' => '? ' .Environment ::class,
63
64
'doctrine ' => '? ' .ManagerRegistry::class,
64
65
'form.factory ' => '? ' .FormFactoryInterface::class,
65
66
'security.token_storage ' => '? ' .TokenStorageInterface::class,
Original file line number Diff line number Diff line change @@ -317,7 +317,7 @@ public function testdenyAccessUnlessGranted()
317
317
318
318
public function testRenderViewTwig ()
319
319
{
320
- $ twig = $ this ->getMockBuilder ('\Twig_Environment ' )->disableOriginalConstructor ()->getMock ();
320
+ $ twig = $ this ->getMockBuilder ('Twig\Environment ' )->disableOriginalConstructor ()->getMock ();
321
321
$ twig ->expects ($ this ->once ())->method ('render ' )->willReturn ('bar ' );
322
322
323
323
$ container = new Container ();
@@ -331,7 +331,7 @@ public function testRenderViewTwig()
331
331
332
332
public function testRenderTwig ()
333
333
{
334
- $ twig = $ this ->getMockBuilder ('\Twig_Environment ' )->disableOriginalConstructor ()->getMock ();
334
+ $ twig = $ this ->getMockBuilder ('Twig\Environment ' )->disableOriginalConstructor ()->getMock ();
335
335
$ twig ->expects ($ this ->once ())->method ('render ' )->willReturn ('bar ' );
336
336
337
337
$ container = new Container ();
@@ -345,7 +345,7 @@ public function testRenderTwig()
345
345
346
346
public function testStreamTwig ()
347
347
{
348
- $ twig = $ this ->getMockBuilder ('\Twig_Environment ' )->disableOriginalConstructor ()->getMock ();
348
+ $ twig = $ this ->getMockBuilder ('Twig\Environment ' )->disableOriginalConstructor ()->getMock ();
349
349
350
350
$ container = new Container ();
351
351
$ container ->set ('twig ' , $ twig );
Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ class TemplateControllerTest extends TestCase
22
22
{
23
23
public function testTwig ()
24
24
{
25
- $ twig = $ this ->getMockBuilder ('\Twig_Environment ' )->disableOriginalConstructor ()->getMock ();
25
+ $ twig = $ this ->getMockBuilder ('Twig\Environment ' )->disableOriginalConstructor ()->getMock ();
26
26
$ twig ->expects ($ this ->once ())->method ('render ' )->willReturn ('bar ' );
27
27
28
28
$ container = $ this ->getMockBuilder ('Symfony\Component\DependencyInjection\ContainerInterface ' )->getMock ();
Original file line number Diff line number Diff line change 56
56
"symfony/web-link" : " ~3.3" ,
57
57
"doctrine/annotations" : " ~1.0" ,
58
58
"phpdocumentor/reflection-docblock" : " ^3.0" ,
59
- "twig/twig" : " ~1.26 |~2.0 " ,
59
+ "twig/twig" : " ~1.34 |~2.4 " ,
60
60
"sensio/framework-extra-bundle" : " ^3.0.2"
61
61
},
62
62
"conflict" : {
You can’t perform that action at this time.
0 commit comments