From aa6574b6fed8897ce3e96232b82401d95bff17e9 Mon Sep 17 00:00:00 2001 From: Tim Timmermans Date: Mon, 4 Dec 2017 15:43:00 +0100 Subject: [PATCH 1/2] depend on router interface instead of concrete implementation --- EventListener/EditInPlaceResponseListener.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/EventListener/EditInPlaceResponseListener.php b/EventListener/EditInPlaceResponseListener.php index c3a7919c..a817e929 100644 --- a/EventListener/EditInPlaceResponseListener.php +++ b/EventListener/EditInPlaceResponseListener.php @@ -13,7 +13,7 @@ use Symfony\Component\Asset\Packages; use Symfony\Component\HttpKernel\Event\FilterResponseEvent; -use Symfony\Component\Routing\Router; +use Symfony\Component\Routing\RouterInterface; use Translation\Bundle\EditInPlace\ActivatorInterface; /** @@ -44,7 +44,7 @@ final class EditInPlaceResponseListener private $activator; /** - * @var Router + * @var RouterInterface */ private $router; @@ -65,7 +65,7 @@ final class EditInPlaceResponseListener */ private $showUntranslatable; - public function __construct(ActivatorInterface $activator, Router $router, Packages $packages, $configName = 'default', $showUntranslatable = true) + public function __construct(ActivatorInterface $activator, RouterInterface $router, Packages $packages, $configName = 'default', $showUntranslatable = true) { $this->activator = $activator; $this->router = $router; From 10e3220af2d3593427fd01fcb734c9b0c29469c3 Mon Sep 17 00:00:00 2001 From: Tim Timmermans Date: Mon, 4 Dec 2017 15:59:37 +0100 Subject: [PATCH 2/2] change type hint to UrlGeneratorInterface --- EventListener/EditInPlaceResponseListener.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/EventListener/EditInPlaceResponseListener.php b/EventListener/EditInPlaceResponseListener.php index a817e929..a2a95caa 100644 --- a/EventListener/EditInPlaceResponseListener.php +++ b/EventListener/EditInPlaceResponseListener.php @@ -13,7 +13,7 @@ use Symfony\Component\Asset\Packages; use Symfony\Component\HttpKernel\Event\FilterResponseEvent; -use Symfony\Component\Routing\RouterInterface; +use Symfony\Component\Routing\Generator\UrlGeneratorInterface; use Translation\Bundle\EditInPlace\ActivatorInterface; /** @@ -44,7 +44,7 @@ final class EditInPlaceResponseListener private $activator; /** - * @var RouterInterface + * @var UrlGeneratorInterface */ private $router; @@ -65,7 +65,7 @@ final class EditInPlaceResponseListener */ private $showUntranslatable; - public function __construct(ActivatorInterface $activator, RouterInterface $router, Packages $packages, $configName = 'default', $showUntranslatable = true) + public function __construct(ActivatorInterface $activator, UrlGeneratorInterface $router, Packages $packages, $configName = 'default', $showUntranslatable = true) { $this->activator = $activator; $this->router = $router;