Skip to content

Add explicit dependency against "twig/twig" #144

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 19, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions TwigExtension/TicketFeatureExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@
namespace Hackzilla\Bundle\TicketBundle\TwigExtension;

use Hackzilla\Bundle\TicketBundle\Component\TicketFeatures;
use Twig\Extension\AbstractExtension;
use Twig\TwigFunction;

class TicketFeatureExtension extends \Twig_Extension
class TicketFeatureExtension extends AbstractExtension
{
private $ticketFeatures;

Expand All @@ -19,7 +21,7 @@ public function __construct(TicketFeatures $ticketFeatures)
public function getFunctions()
{
return [
new \Twig_SimpleFunction('hasTicketFeature', [$this, 'hasFeature']),
new TwigFunction('hasTicketFeature', [$this, 'hasFeature']),
];
}

Expand Down
5 changes: 4 additions & 1 deletion TwigExtension/TicketGlobalExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@

namespace Hackzilla\Bundle\TicketBundle\TwigExtension;

class TicketGlobalExtension extends \Twig_Extension implements \Twig_Extension_GlobalsInterface
use Twig\Extension\AbstractExtension;
use Twig\Extension\GlobalsInterface;

class TicketGlobalExtension extends AbstractExtension implements GlobalsInterface
{
protected $templates = [];

Expand Down
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@
"symfony/security-bundle": "^2.8 || ^3.0 || ^4.0",
"symfony/translation": "^2.8 || ^3.0 || ^4.0",
"symfony/validator": "^2.8 || ^3.0 || ^4.0",
"symfony/yaml": "^2.8 || ^3.0 || ^4.0"
"symfony/yaml": "^2.8 || ^3.0 || ^4.0",
"twig/twig": "^1.34 || ^2.0"
},
"require-dev": {
"ext-pdo_sqlite": "*",
Expand Down