From 33b31da54700446e6b426e915a0d2554a4b8f284 Mon Sep 17 00:00:00 2001 From: Rattler3 Date: Tue, 25 Aug 2015 16:23:15 +0100 Subject: [PATCH 1/3] Fix deprecated twig filter syntax --- Templating/ImagineExtension.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Templating/ImagineExtension.php b/Templating/ImagineExtension.php index 4405bb9a8..7258df454 100644 --- a/Templating/ImagineExtension.php +++ b/Templating/ImagineExtension.php @@ -27,7 +27,7 @@ public function __construct(CacheManager $cacheManager) public function getFilters() { return array( - 'imagine_filter' => new \Twig_Filter_Method($this, 'filter'), + new \Twig_SimpleFunction('imagine_filter', array($this, 'filter')), ); } From 90da3d518be0a234b8f6932108c5979152445a5b Mon Sep 17 00:00:00 2001 From: Rattler3 Date: Wed, 26 Aug 2015 08:51:24 +0100 Subject: [PATCH 2/3] Fixed incorrect class usage and increased minimum twig version --- Templating/ImagineExtension.php | 2 +- composer.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Templating/ImagineExtension.php b/Templating/ImagineExtension.php index 7258df454..0ff0c949e 100644 --- a/Templating/ImagineExtension.php +++ b/Templating/ImagineExtension.php @@ -27,7 +27,7 @@ public function __construct(CacheManager $cacheManager) public function getFilters() { return array( - new \Twig_SimpleFunction('imagine_filter', array($this, 'filter')), + new \Twig_SimpleFilter('imagine_filter', array($this, 'filter')) ); } diff --git a/composer.json b/composer.json index 50aa9249c..de22f2e60 100644 --- a/composer.json +++ b/composer.json @@ -34,7 +34,7 @@ "doctrine/orm": "~2.3", "doctrine/mongodb-odm": "1.0.*", "doctrine/cache": "~1.1", - "twig/twig": "~1.0", + "twig/twig": "~1.12", "aws/aws-sdk-php": "~2.4", "amazonwebservices/aws-sdk-for-php": "~1.0", "psr/log": "~1.0", From 1ab5454f2d4af3f0c421b272097234b79b6fa12b Mon Sep 17 00:00:00 2001 From: Rattler3 Date: Wed, 26 Aug 2015 09:08:21 +0100 Subject: [PATCH 3/3] Updated twig description in composer.json --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index de22f2e60..c695176fd 100644 --- a/composer.json +++ b/composer.json @@ -42,7 +42,7 @@ }, "suggest": { - "twig/twig": "If you'd want to use some handy twig filters", + "twig/twig": "If you'd want to use some handy twig filters, version 1.12 or greater required", "aws/aws-sdk-php": "Add it if you'd like to use aws v2 or v3 resolver", "amazonwebservices/aws-sdk-for-php": "Add it if you'd like to use aws v1 resolver", "monolog/monolog": "If you'd want to write logs"