Skip to content

Commit c146125

Browse files
author
Jérôme Poskin
committed
Fix Twig extensions
1 parent 2f513f8 commit c146125

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

Twig/Extension/ImExtension.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ public function getTokenParsers()
5353
public function getFilters()
5454
{
5555
return array(
56-
'imresize' => new \Twig_Filter_Method($this, 'imResize', array('pre_escape' => 'html', 'is_safe' => array('html'))),
56+
new \Twig_SimpleFilter('imresize', array($this, 'imResize'), array('pre_escape' => 'html', 'is_safe' => array('html'))),
5757
);
5858
}
5959

@@ -64,7 +64,7 @@ public function getFilters()
6464
public function getFunctions()
6565
{
6666
return array(
67-
'imresize' => new \Twig_Function_Method($this, 'imResize', array('pre_escape' => 'html', 'is_safe' => array('html'))),
67+
new \Twig_SimpleFunction('imresize', array($this, 'imResize'), array('pre_escape' => 'html', 'is_safe' => array('html'))),
6868
);
6969
}
7070

composer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,8 @@
3131
"require-dev": {
3232
"symfony/symfony": ">=2.7",
3333
"mikey179/vfsStream": "v1.0.0",
34-
"phpunit/phpunit": "~4.7@dev"
34+
"phpunit/phpunit": "^4.8",
35+
"symfony/phpunit-bridge": "^2.7"
3536
},
3637
"suggest": {
3738
"snowcap/core-bundle": "ImBundle provides a form type extension for the Snowcap CoreBundle ImageType"

0 commit comments

Comments
 (0)