Skip to content

Commit

Permalink
Fix Twig extensions
Browse files Browse the repository at this point in the history
  • Loading branch information
Jérôme Poskin committed Sep 26, 2015
1 parent 2f513f8 commit c146125
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions Twig/Extension/ImExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public function getTokenParsers()
public function getFilters()
{
return array(
'imresize' => new \Twig_Filter_Method($this, 'imResize', array('pre_escape' => 'html', 'is_safe' => array('html'))),
new \Twig_SimpleFilter('imresize', array($this, 'imResize'), array('pre_escape' => 'html', 'is_safe' => array('html'))),
);
}

Expand All @@ -64,7 +64,7 @@ public function getFilters()
public function getFunctions()
{
return array(
'imresize' => new \Twig_Function_Method($this, 'imResize', array('pre_escape' => 'html', 'is_safe' => array('html'))),
new \Twig_SimpleFunction('imresize', array($this, 'imResize'), array('pre_escape' => 'html', 'is_safe' => array('html'))),
);
}

Expand Down
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@
"require-dev": {
"symfony/symfony": ">=2.7",
"mikey179/vfsStream": "v1.0.0",
"phpunit/phpunit": "~4.7@dev"
"phpunit/phpunit": "^4.8",
"symfony/phpunit-bridge": "^2.7"
},
"suggest": {
"snowcap/core-bundle": "ImBundle provides a form type extension for the Snowcap CoreBundle ImageType"
Expand Down

0 comments on commit c146125

Please sign in to comment.