Skip to content

Commit

Permalink
Merge pull request #673 from sebastianblum/master
Browse files Browse the repository at this point in the history
Removed UrlGenerator deprecations from symfony 2.8
  • Loading branch information
makasim committed Dec 10, 2015
2 parents 471a261 + 361ac2e commit c2dfddf
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
5 changes: 3 additions & 2 deletions Imagine/Cache/CacheManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down
3 changes: 2 additions & 1 deletion Tests/Imagine/Cache/CacheManagerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -290,7 +291,7 @@ public function testGenerateUrl()
'path' => $path,
'filter' => 'thumbnail',
),
true
UrlGeneratorInterface::ABSOLUTE_URL
)
->will($this->returnValue($expectedUrl))
;
Expand Down

0 comments on commit c2dfddf

Please sign in to comment.