From 361ac2ef8de8ead05c7d3c6ced706d519972fb14 Mon Sep 17 00:00:00 2001 From: sebastianblum Date: Thu, 10 Dec 2015 13:25:26 +0100 Subject: [PATCH] Removed UrlGenerator deprecations from symfony 2.8 --- Imagine/Cache/CacheManager.php | 5 +++-- Tests/Imagine/Cache/CacheManagerTest.php | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Imagine/Cache/CacheManager.php b/Imagine/Cache/CacheManager.php index 0cb71f00c..588978151 100644 --- a/Imagine/Cache/CacheManager.php +++ b/Imagine/Cache/CacheManager.php @@ -6,6 +6,7 @@ use Liip\ImagineBundle\Imagine\Cache\Resolver\ResolverInterface; use Liip\ImagineBundle\Imagine\Filter\FilterConfiguration; use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; +use Symfony\Component\Routing\Generator\UrlGeneratorInterface; use Symfony\Component\Routing\RouterInterface; use Symfony\Component\EventDispatcher\EventDispatcherInterface; use Liip\ImagineBundle\ImagineEvents; @@ -164,12 +165,12 @@ public function generateUrl($path, $filter, array $runtimeConfig = array()) ); if (empty($runtimeConfig)) { - $filterUrl = $this->router->generate('liip_imagine_filter', $params, true); + $filterUrl = $this->router->generate('liip_imagine_filter', $params, UrlGeneratorInterface::ABSOLUTE_URL); } else { $params['filters'] = $runtimeConfig; $params['hash'] = $this->signer->sign($path, $runtimeConfig); - $filterUrl = $this->router->generate('liip_imagine_filter_runtime', $params, true); + $filterUrl = $this->router->generate('liip_imagine_filter_runtime', $params, UrlGeneratorInterface::ABSOLUTE_URL); } return $filterUrl; diff --git a/Tests/Imagine/Cache/CacheManagerTest.php b/Tests/Imagine/Cache/CacheManagerTest.php index 4066d0ef5..badb622fb 100644 --- a/Tests/Imagine/Cache/CacheManagerTest.php +++ b/Tests/Imagine/Cache/CacheManagerTest.php @@ -8,6 +8,7 @@ use Liip\ImagineBundle\Imagine\Cache\Signer; use Liip\ImagineBundle\ImagineEvents; use Liip\ImagineBundle\Events\CacheResolveEvent; +use Symfony\Component\Routing\Generator\UrlGeneratorInterface; /** * @covers Liip\ImagineBundle\Imagine\Cache\CacheManager @@ -290,7 +291,7 @@ public function testGenerateUrl() 'path' => $path, 'filter' => 'thumbnail', ), - true + UrlGeneratorInterface::ABSOLUTE_URL ) ->will($this->returnValue($expectedUrl)) ;