From 89a3347d3ff4d624ee7c0772d514bf7448fe5733 Mon Sep 17 00:00:00 2001 From: Ardian Yuli Setyanto Date: Fri, 22 Feb 2013 01:25:21 +0700 Subject: [PATCH 01/26] Add Crop filter support --- Imagine/Filter/Loader/CropFilterLoader.php | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 Imagine/Filter/Loader/CropFilterLoader.php diff --git a/Imagine/Filter/Loader/CropFilterLoader.php b/Imagine/Filter/Loader/CropFilterLoader.php new file mode 100644 index 0000000..2e36b7f --- /dev/null +++ b/Imagine/Filter/Loader/CropFilterLoader.php @@ -0,0 +1,20 @@ + Date: Fri, 22 Feb 2013 01:29:10 +0700 Subject: [PATCH 02/26] Add service config for new crop filter --- Resources/config/imagine.xml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Resources/config/imagine.xml b/Resources/config/imagine.xml index 88607e1..3243b5a 100644 --- a/Resources/config/imagine.xml +++ b/Resources/config/imagine.xml @@ -49,6 +49,8 @@ Avalanche\Bundle\ImagineBundle\Imagine\Filter\Loader\ChainFilterLoader + Avalanche\Bundle\ImagineBundle\Imagine\Filter\Loader\CropFilterLoader + @@ -135,6 +137,10 @@ + + + + From 151e1f1b8e9611bb5ea935e8aaf4c437949a9e03 Mon Sep 17 00:00:00 2001 From: Ardian Yuli Setyanto Date: Fri, 22 Feb 2013 01:34:16 +0700 Subject: [PATCH 03/26] Add docs for new crop filter --- README.md | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 9137787..fb7951c 100644 --- a/README.md +++ b/README.md @@ -313,6 +313,18 @@ avalanche_imagine: ``` +### Crop + +The `crop` filter crop an image with start coordinate, and size dimension. + +``` yaml +avalanche_imagine: + filters: + crop: + type : crop + options: { start: [0, 0], size: [100, 100] } #crop image with 100x100 square box +``` + ## Load your Custom Filters The ImagineBundle allows you to load your own custom filter classes. The only @@ -369,4 +381,4 @@ $avalancheService = $this->get('imagine.cache.path.resolver'); Then, call the getBrowserPath and pass the original image webpath and the filter you want to use ```php $cachedImage = $avalancheService->getBrowserPath($object->getWebPath(), 'my_thumb'); -``` \ No newline at end of file +``` From 4c92935d4d875998103848f61ed2f8f278e521af Mon Sep 17 00:00:00 2001 From: Kevin Bond Date: Thu, 11 Apr 2013 18:16:20 -0300 Subject: [PATCH 04/26] catch exception when invalid filter is used --- Controller/ImagineController.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Controller/ImagineController.php b/Controller/ImagineController.php index 6beaa01..138b212 100644 --- a/Controller/ImagineController.php +++ b/Controller/ImagineController.php @@ -58,7 +58,11 @@ public function __construct(Request $request, ImagineInterface $imagine, CacheMa */ public function filter($path, $filter) { - $cachedPath = $this->cacheManager->cacheImage($this->request->getBaseUrl(), $path, $filter); + try { + $cachedPath = $this->cacheManager->cacheImage($this->request->getBaseUrl(), $path, $filter); + } catch (RouteNotFoundException $e) { + throw new NotFoundHttpException('Filter doesn\'t exist.'); + } // if cache path cannot be determined, return 404 if (null === $cachedPath) { From 3158bdb21204bc1b0b251d05bed9caff70dee4e2 Mon Sep 17 00:00:00 2001 From: ejsidisi Date: Tue, 16 Apr 2013 18:34:08 +0300 Subject: [PATCH 05/26] Update composer.json --- composer.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/composer.json b/composer.json index 47d1d9b..26b0532 100644 --- a/composer.json +++ b/composer.json @@ -21,7 +21,7 @@ ], "require": { "symfony/framework-bundle": "2.*", - "imagine/Imagine": "v0.4.1" + "imagine/Imagine": "dev-master" }, "require-dev": { "makasim/temp-file": "dev-master" @@ -33,4 +33,4 @@ "psr-0": { "Avalanche\\Bundle\\ImagineBundle": "" } }, "target-dir": "Avalanche/Bundle/ImagineBundle" -} \ No newline at end of file +} From a465aacf011cf40473d6a36441f8165ae502168d Mon Sep 17 00:00:00 2001 From: Kevin Bond Date: Tue, 16 Apr 2013 17:13:13 -0300 Subject: [PATCH 06/26] added missing use statement --- Controller/ImagineController.php | 1 + 1 file changed, 1 insertion(+) diff --git a/Controller/ImagineController.php b/Controller/ImagineController.php index 138b212..60da088 100644 --- a/Controller/ImagineController.php +++ b/Controller/ImagineController.php @@ -8,6 +8,7 @@ use Symfony\Component\HttpFoundation\Response; use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; use Avalanche\Bundle\ImagineBundle\Imagine\CacheManager; +use Symfony\Component\Routing\Exception\RouteNotFoundException; class ImagineController { From f19469618926ea68cba98bb81c60b1580c711c90 Mon Sep 17 00:00:00 2001 From: Bup3 Date: Tue, 7 May 2013 09:41:15 +0200 Subject: [PATCH 07/26] Fixed bug with symfony 2.3 --- Controller/ImagineController.php | 13 +++++++++++-- Resources/config/imagine.xml | 6 ++++-- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/Controller/ImagineController.php b/Controller/ImagineController.php index 60da088..7af2ff4 100644 --- a/Controller/ImagineController.php +++ b/Controller/ImagineController.php @@ -40,9 +40,8 @@ class ImagineController * @param CacheManager $cacheManager * @param FilterManager $filterManager */ - public function __construct(Request $request, ImagineInterface $imagine, CacheManager $cacheManager, FilterManager $filterManager) + public function __construct(ImagineInterface $imagine, CacheManager $cacheManager, FilterManager $filterManager) { - $this->request = $request; $this->imagine = $imagine; $this->cacheManager = $cacheManager; $this->filterManager = $filterManager; @@ -111,4 +110,14 @@ public function filter($path, $filter) throw $e; } } + + /** + * Set the request + * + * @param Request $request + */ + public function setRequest(Request $request = null) + { + $this->request = $request; + } } diff --git a/Resources/config/imagine.xml b/Resources/config/imagine.xml index 3243b5a..01bafdb 100644 --- a/Resources/config/imagine.xml +++ b/Resources/config/imagine.xml @@ -77,11 +77,13 @@ - - + + + + From 99d1a445bdc3265f09b6a2fced80b007af76d945 Mon Sep 17 00:00:00 2001 From: EricGrivilers Date: Tue, 7 May 2013 16:09:21 +0300 Subject: [PATCH 08/26] Check if $cached is not a directory to avoid error on unlink --- Imagine/CachePathResolver.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Imagine/CachePathResolver.php b/Imagine/CachePathResolver.php index ad1cfac..1c3fdbf 100644 --- a/Imagine/CachePathResolver.php +++ b/Imagine/CachePathResolver.php @@ -56,7 +56,7 @@ public function getBrowserPath($path, $filter, $absolute = false) $cached = realpath($this->webRoot.$path); - if (file_exists($cached) && filemtime($realPath) > filemtime($cached)) { + if (file_exists($cached) && !is_dir($cached) && filemtime($realPath) > filemtime($cached)) { unlink($cached); } From eba1fa09fc94ad558829c2bdd730c1c6dc1e908a Mon Sep 17 00:00:00 2001 From: Yanick Ouellet Date: Fri, 31 May 2013 12:49:21 -0300 Subject: [PATCH 09/26] Merge recursively the config Only the first-level array was merged, if two different filters were defined in different config array, only one was kept. --- DependencyInjection/AvalancheImagineExtension.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DependencyInjection/AvalancheImagineExtension.php b/DependencyInjection/AvalancheImagineExtension.php index cc9ff85..c83f21f 100644 --- a/DependencyInjection/AvalancheImagineExtension.php +++ b/DependencyInjection/AvalancheImagineExtension.php @@ -44,7 +44,7 @@ private function mergeConfig(array $configs) $config = array(); foreach ($configs as $cnf) { - $config = array_merge($config, $cnf); + $config = array_merge_recursive($config, $cnf); } return $config; From 3cf61e77e59580107d3249c27068168eba5458d1 Mon Sep 17 00:00:00 2001 From: Gustavo Straube Date: Wed, 31 Jul 2013 14:09:43 -0300 Subject: [PATCH 10/26] Fixing bug in cached content verifying (switching from 'file_exists' to 'is_file'). --- Imagine/CacheManager.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Imagine/CacheManager.php b/Imagine/CacheManager.php index 7d69065..33c07b9 100644 --- a/Imagine/CacheManager.php +++ b/Imagine/CacheManager.php @@ -65,11 +65,11 @@ public function cacheImage($basePath, $path, $filter) $sourcePath = $this->sourceRoot.$path; // if the file has already been cached, just return path - if (file_exists($realPath)) { + if (is_file($realPath)) { return $realPath; } - if (!file_exists($sourcePath)) { + if (!is_file($sourcePath)) { return null; } From ae27b50a886abcd5135356641910e85a1fb575a9 Mon Sep 17 00:00:00 2001 From: Gustavo Straube Date: Wed, 31 Jul 2013 14:39:54 -0300 Subject: [PATCH 11/26] Fixing bug related to concurrency in dir creation. See PHP bug #35326. --- Imagine/CacheManager.php | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/Imagine/CacheManager.php b/Imagine/CacheManager.php index 33c07b9..1e89c5e 100644 --- a/Imagine/CacheManager.php +++ b/Imagine/CacheManager.php @@ -76,10 +76,16 @@ public function cacheImage($basePath, $path, $filter) $dir = pathinfo($realPath, PATHINFO_DIRNAME); if (!is_dir($dir)) { - if (false === $this->filesystem->mkdir($dir)) { - throw new \RuntimeException(sprintf( - 'Could not create directory %s', $dir - )); + try { + if (false === $this->filesystem->mkdir($dir)) { + throw new \RuntimeException(sprintf( + 'Could not create directory %s', $dir + )); + } + } catch (\Exception $e) { + if (!is_dir($dir)) { + throw $e; + } } } From 5c29c786c2b117cac45f68e1a01a33713231b128 Mon Sep 17 00:00:00 2001 From: josaliba Date: Tue, 24 Dec 2013 12:42:38 -0500 Subject: [PATCH 12/26] fixed link to imagine library --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index fb7951c..703290f 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ This will perform the transformation called `thumbnail`, which you can define to do a number of different things, such as resizing, cropping, drawing, masking, etc. -This bundle integrates the standalone PHP "[Imagine library](/avalanche123/Imagine)". +This bundle integrates the standalone PHP "[Imagine library](https://github.com/avalanche123/Imagine)". ## Installation From 6dc212c39e3013e44800ee9de97f67063de314c7 Mon Sep 17 00:00:00 2001 From: Athlan Date: Sat, 10 May 2014 02:06:59 +0200 Subject: [PATCH 13/26] can be overrided in filter options. --- Imagine/CacheManager.php | 4 +++- README.md | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Imagine/CacheManager.php b/Imagine/CacheManager.php index 1e89c5e..5139ad5 100644 --- a/Imagine/CacheManager.php +++ b/Imagine/CacheManager.php @@ -62,7 +62,9 @@ public function cacheImage($basePath, $path, $filter) } $realPath = $this->webRoot.$browserPath; - $sourcePath = $this->sourceRoot.$path; + + $sourcePathRoot = $this->filterManager->getOption($filter, "source_root", $this->sourceRoot); + $sourcePath = $sourcePathRoot.$path; // if the file has already been cached, just return path if (is_file($realPath)) { diff --git a/README.md b/README.md index 703290f..9cd480e 100644 --- a/README.md +++ b/README.md @@ -209,6 +209,7 @@ Each filter that you specify have the following options: - `type` - determine the type of filter to be used, refer to *Filters* section for more information - `options` - options that should be passed to the specific filter type - `path` - override the global `cache_prefix` and replace it with this path + - `source_root` - override the global `source_root` and replace it with this path ## Built-in Filters From 6e8eaad47bde70deab9a6cf5671b072b6013d09c Mon Sep 17 00:00:00 2001 From: Piotr Pelczar Date: Sat, 10 May 2014 03:31:33 +0200 Subject: [PATCH 14/26] Update composer.json --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 26b0532..506bf60 100644 --- a/composer.json +++ b/composer.json @@ -21,7 +21,7 @@ ], "require": { "symfony/framework-bundle": "2.*", - "imagine/Imagine": "dev-master" + "imagine/Imagine": "v0.5.0" }, "require-dev": { "makasim/temp-file": "dev-master" From 3055eb3d857bf798f573aeb8407d799b798294b4 Mon Sep 17 00:00:00 2001 From: Christian Mattart Date: Mon, 25 Aug 2014 16:39:14 +0200 Subject: [PATCH 15/26] Add permissions configuration setting to set specific chmod value on generated images. --- Imagine/CacheManager.php | 17 ++++++++++++++++- Resources/config/imagine.xml | 2 ++ 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/Imagine/CacheManager.php b/Imagine/CacheManager.php index 5139ad5..6214cf5 100644 --- a/Imagine/CacheManager.php +++ b/Imagine/CacheManager.php @@ -18,6 +18,7 @@ class CacheManager * @param Filesystem $filesystem * @param string $webRoot * @param string $sourceRoot + * @param int $permissions */ public function __construct( CachePathResolver $cachePathResolver, @@ -25,7 +26,8 @@ public function __construct( FilterManager $filterManager, Filesystem $filesystem, $webRoot, - $sourceRoot + $sourceRoot, + $permissions ) { $this->cachePathResolver = $cachePathResolver; @@ -34,6 +36,7 @@ public function __construct( $this->filesystem = $filesystem; $this->webRoot = $webRoot; $this->sourceRoot = $sourceRoot; + $this->permissions = $permissions; } /** @@ -100,6 +103,18 @@ public function cacheImage($basePath, $path, $filter) )) ; + try { + if (!chmod($realPath, $this->permissions)) + { + throw new \RuntimeException(sprintf( + 'Could not set permissions %s on image saved in %s', $this->permissions, $realPath + )); + } + + } catch (Exception $e) { + throw $e; + } + return $realPath; } } diff --git a/Resources/config/imagine.xml b/Resources/config/imagine.xml index 3243b5a..69229fa 100644 --- a/Resources/config/imagine.xml +++ b/Resources/config/imagine.xml @@ -11,6 +11,7 @@ %kernel.root_dir%/../web media/cache + 0644 @@ -69,6 +70,7 @@ %imagine.web_root% %imagine.source_root% + %imagine.permissions% From 21fbabb073c2a104806950f5d1b7717e603ef39c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javier=20Jim=C3=A9nez=20=C3=81lvarez?= Date: Fri, 19 Sep 2014 12:31:07 +0200 Subject: [PATCH 16/26] Update README.md --- README.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 9cd480e..e1af26a 100644 --- a/README.md +++ b/README.md @@ -374,7 +374,7 @@ will apply your filter to '.jpg', and then concatenate the result to ## Using as a service -You can also use ImagineBundle as a service and create the cache image from controller. +You can use ImagineBundle as a service and resolve the cached image path. ```php $avalancheService = $this->get('imagine.cache.path.resolver'); ``` @@ -383,3 +383,10 @@ Then, call the getBrowserPath and pass the original image webpath and the filter ```php $cachedImage = $avalancheService->getBrowserPath($object->getWebPath(), 'my_thumb'); ``` + +And also use ImagineBundle as a service and create the cache image from controller. +```php +$cacheManager = $this->get('imagine.cache.manager'); +$cachedPath = $cacheManager->cacheImage($this->getRequest()->getBaseUrl(), '/images/picture1.jpg', 'my_filter'); +``` + From 3483480ee52fb595ed378d90a1ceaee1dc752c25 Mon Sep 17 00:00:00 2001 From: Rafael Dohms Date: Fri, 31 Oct 2014 17:08:44 +0100 Subject: [PATCH 17/26] Update README.md Updated installation instructions via composer to use the `composer require` command without specifying a version. This is the new recommended way of providing this information and it leads to composer picking the proper version constraint (i.e ~1.2), updating the `composer.json` and running install, all in one command. --- README.md | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index e1af26a..d04a6ad 100644 --- a/README.md +++ b/README.md @@ -26,18 +26,8 @@ Installation is a quick 3 step process: Add AvalancheImagineBundle in your composer.json: -```js -{ - "require": { - "avalanche123/imagine-bundle": "v2.1" - } -} -``` - -Now tell composer to download the bundle by running the command: - -``` bash -$ php composer.phar update avalanche123/imagine-bundle +```sh +composer require avalanche123/imagine-bundle ``` Composer will install the bundle to your project's `vendor/avalanche123/imagine-bundle` directory. From 8f47e027d4255ad078f6e7b1812b70fd1773f5bf Mon Sep 17 00:00:00 2001 From: Bulat Shakirzyanov Date: Thu, 4 Dec 2014 15:03:04 -0800 Subject: [PATCH 18/26] Update README.md --- README.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/README.md b/README.md index e1af26a..2e4ea74 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,8 @@ +Deprecated +========== + +This project is no longer actively maintained, please find one of the populate forks. Thanks! + AvalancheImagineBundle ====================== From d2871621a3fcdc08b7a209ebdee1c9a38e8683c4 Mon Sep 17 00:00:00 2001 From: FlashBlack Date: Wed, 4 Mar 2015 02:00:59 +0300 Subject: [PATCH 19/26] Update imagine.xml Add sourceRoot to the imagine.cache.path.resolver.class --- Resources/config/imagine.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/Resources/config/imagine.xml b/Resources/config/imagine.xml index 54c6177..b7d4384 100644 --- a/Resources/config/imagine.xml +++ b/Resources/config/imagine.xml @@ -60,6 +60,7 @@ %imagine.web_root% + %imagine.source_root% From 3a3abdc46e110cb834f5bd55c655ed6236794e5b Mon Sep 17 00:00:00 2001 From: FlashBlack Date: Wed, 4 Mar 2015 02:31:51 +0300 Subject: [PATCH 20/26] Update CachePathResolver.php Replace webRoot to sourceRoot in realPath --- Imagine/CachePathResolver.php | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/Imagine/CachePathResolver.php b/Imagine/CachePathResolver.php index 1c3fdbf..a05070e 100644 --- a/Imagine/CachePathResolver.php +++ b/Imagine/CachePathResolver.php @@ -11,6 +11,11 @@ class CachePathResolver * @var string */ private $webRoot; + + /** + * @var string + */ + private $sourceRoot; /** * @var Symfony\Component\Routing\RouterInterface @@ -21,11 +26,13 @@ class CachePathResolver * Constructs cache path resolver with a given web root and cache prefix * * @param string $webRoot + * @param string $sourceRoot * @param Symfony\Component\Routing\RouterInterface $router */ - public function __construct($webRoot, RouterInterface $router) + public function __construct($webRoot, $sourceRoot, RouterInterface $router) { $this->webRoot = $webRoot; + $this->sourceRoot = $sourceRoot; $this->router = $router; } @@ -38,11 +45,11 @@ public function __construct($webRoot, RouterInterface $router) */ public function getBrowserPath($path, $filter, $absolute = false) { - // identify if current path is not under specified web root and return + // identify if current path is not under specified source root and return // unmodified path in that case - $realPath = realpath($this->webRoot.$path); + $realPath = realpath($this->sourceRoot.$path); - if (!0 === strpos($realPath, $this->webRoot)) { + if (!0 === strpos($realPath, $this->sourceRoot)) { return $path; } From 74bfb4bfd77b69d56b4f0f172dc1db843e70f06a Mon Sep 17 00:00:00 2001 From: i--storm Date: Mon, 25 Jul 2016 12:11:28 +0300 Subject: [PATCH 21/26] Update composer.json --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 506bf60..f979900 100644 --- a/composer.json +++ b/composer.json @@ -1,5 +1,5 @@ { - "name": "avalanche123/imagine-bundle", + "name": "i--storm/avalanche-imagine-bundle", "description": "Image manipulation using Imagine and Twig Filters.", "keywords": ["image manipulation", "imagine"], "homepage": "https://github.com/avalanche123/AvalancheImagineBundle", From c846b1eba3a37495641f1546509621b97440b882 Mon Sep 17 00:00:00 2001 From: Victor Yagnov Date: Sat, 26 Nov 2016 22:50:51 +0300 Subject: [PATCH 22/26] json fix --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index f979900..2bdd2d6 100644 --- a/composer.json +++ b/composer.json @@ -20,7 +20,7 @@ } ], "require": { - "symfony/framework-bundle": "2.*", + "symfony/framework-bundle": "2.*|3.*", "imagine/Imagine": "v0.5.0" }, "require-dev": { From f912d632d1c086064494c31ce85af76b8d241cce Mon Sep 17 00:00:00 2001 From: Victor Yagnov Date: Sat, 26 Nov 2016 23:15:26 +0300 Subject: [PATCH 23/26] js3 fix --- Controller/ImagineController.php | 13 +++++++++++++ Resources/config/imagine.xml | 3 +++ 2 files changed, 16 insertions(+) diff --git a/Controller/ImagineController.php b/Controller/ImagineController.php index 7af2ff4..779aa87 100644 --- a/Controller/ImagineController.php +++ b/Controller/ImagineController.php @@ -5,6 +5,7 @@ use Avalanche\Bundle\ImagineBundle\Imagine\Filter\FilterManager; use Imagine\Image\ImagineInterface; use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpFoundation\RequestStack; use Symfony\Component\HttpFoundation\Response; use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; use Avalanche\Bundle\ImagineBundle\Imagine\CacheManager; @@ -120,4 +121,16 @@ public function setRequest(Request $request = null) { $this->request = $request; } + + /** + * Set the request + * + * @param Request $request + */ + public function setRequestStack(RequestStack $request_stack = null) + { + if(!isset($this->request)) { + $this->request=$request_stack->getCurrentRequest(); + } + } } diff --git a/Resources/config/imagine.xml b/Resources/config/imagine.xml index b7d4384..a245a81 100644 --- a/Resources/config/imagine.xml +++ b/Resources/config/imagine.xml @@ -87,6 +87,9 @@ + + + From f4c9f255490f2c3f44480288146af5b5e2518a6e Mon Sep 17 00:00:00 2001 From: i--storm Date: Thu, 1 Feb 2018 18:18:26 +0300 Subject: [PATCH 24/26] fix Twig_SimpleFilter --- Templating/ImagineExtension.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Templating/ImagineExtension.php b/Templating/ImagineExtension.php index 835022a..41ed1e9 100644 --- a/Templating/ImagineExtension.php +++ b/Templating/ImagineExtension.php @@ -29,7 +29,7 @@ public function __construct(CachePathResolver $cachePathResolver) public function getFilters() { return array( - 'apply_filter' => new \Twig_Filter_Method($this, 'applyFilter'), + new \Twig_SimpleFilter('apply_filter', array($this, 'applyFilter')), ); } From 1fd042a8c6f7d79e0f73af9d340dff086af31dbe Mon Sep 17 00:00:00 2001 From: i--storm Date: Wed, 17 Mar 2021 12:42:03 +0300 Subject: [PATCH 25/26] Update composer.json fix i--storm --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 2bdd2d6..77dd3ae 100644 --- a/composer.json +++ b/composer.json @@ -1,5 +1,5 @@ { - "name": "i--storm/avalanche-imagine-bundle", + "name": "i-storm/avalanche-imagine-bundle", "description": "Image manipulation using Imagine and Twig Filters.", "keywords": ["image manipulation", "imagine"], "homepage": "https://github.com/avalanche123/AvalancheImagineBundle", From 1879cb1bb1443ba3c7f7a8b6d4b2d4de9f9dcfac Mon Sep 17 00:00:00 2001 From: Vik Date: Mon, 10 Oct 2022 02:50:03 -0700 Subject: [PATCH 26/26] imagine update --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 77dd3ae..6033d0c 100644 --- a/composer.json +++ b/composer.json @@ -21,7 +21,7 @@ ], "require": { "symfony/framework-bundle": "2.*|3.*", - "imagine/Imagine": "v0.5.0" + "imagine/Imagine": "^1.3" }, "require-dev": { "makasim/temp-file": "dev-master"