Skip to content

Commit 6baa2b1

Browse files
committed
merged branch stof/change_typehint (PR symfony#4569)
Commits ------- 92e028f Changed the typehint in the LocaleListener Discussion ---------- Changed the typehint in the LocaleListener The listener does not depend on the RouterInterface but only on the RequestContextAwareInterface which is also implemented by the matcher and the generator. Changing the typehint allow reusing the listener in Silex. --------------------------------------------------------------------------- by travisbot at 2012-06-13T14:12:10Z This pull request [fails](http://travis-ci.org/symfony/symfony/builds/1611055) (merged 92e028f into 1d7501d).
2 parents 1d7501d + 92e028f commit 6baa2b1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Symfony/Component/HttpKernel/EventListener/LocaleListener.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
use Symfony\Component\HttpKernel\Event\GetResponseEvent;
1515
use Symfony\Component\HttpKernel\KernelEvents;
16-
use Symfony\Component\Routing\RouterInterface;
16+
use Symfony\Component\Routing\RequestContextAwareInterface;
1717
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
1818

1919
/**
@@ -26,7 +26,7 @@ class LocaleListener implements EventSubscriberInterface
2626
private $router;
2727
private $defaultLocale;
2828

29-
public function __construct($defaultLocale = 'en', RouterInterface $router = null)
29+
public function __construct($defaultLocale = 'en', RequestContextAwareInterface $router = null)
3030
{
3131
$this->defaultLocale = $defaultLocale;
3232
$this->router = $router;

0 commit comments

Comments
 (0)