Skip to content

Commit c449dd9

Browse files
committed
Add explicit dependency against "twig/twig"
1 parent 07c7ace commit c449dd9

File tree

3 files changed

+10
-4
lines changed

3 files changed

+10
-4
lines changed

TwigExtension/TicketFeatureExtension.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,10 @@
33
namespace Hackzilla\Bundle\TicketBundle\TwigExtension;
44

55
use Hackzilla\Bundle\TicketBundle\Component\TicketFeatures;
6+
use Twig\Extension\AbstractExtension;
7+
use Twig\TwigFunction;
68

7-
class TicketFeatureExtension extends \Twig_Extension
9+
class TicketFeatureExtension extends AbstractExtension
810
{
911
private $ticketFeatures;
1012

@@ -19,7 +21,7 @@ public function __construct(TicketFeatures $ticketFeatures)
1921
public function getFunctions()
2022
{
2123
return [
22-
new \Twig_SimpleFunction('hasTicketFeature', [$this, 'hasFeature']),
24+
new TwigFunction('hasTicketFeature', [$this, 'hasFeature']),
2325
];
2426
}
2527

TwigExtension/TicketGlobalExtension.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,10 @@
22

33
namespace Hackzilla\Bundle\TicketBundle\TwigExtension;
44

5-
class TicketGlobalExtension extends \Twig_Extension implements \Twig_Extension_GlobalsInterface
5+
use Twig\Extension\AbstractExtension;
6+
use Twig\Extension\GlobalsInterface;
7+
8+
class TicketGlobalExtension extends AbstractExtension implements GlobalsInterface
69
{
710
protected $templates = [];
811

composer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,8 @@
4141
"symfony/security-bundle": "^2.8 || ^3.0 || ^4.0",
4242
"symfony/translation": "^2.8 || ^3.0 || ^4.0",
4343
"symfony/validator": "^2.8 || ^3.0 || ^4.0",
44-
"symfony/yaml": "^2.8 || ^3.0 || ^4.0"
44+
"symfony/yaml": "^2.8 || ^3.0 || ^4.0",
45+
"twig/twig": "^1.34 || ^2.0"
4546
},
4647
"require-dev": {
4748
"ext-pdo_sqlite": "*",

0 commit comments

Comments
 (0)