10000 [HttpKernel] renamed the kernel finished event · symfony/symfony@f9b10ba · GitHub
[go: up one dir, main page]

Skip to content

Commit f9b10ba

Browse files
committed
[HttpKernel] renamed the kernel finished event
1 parent a58a8a6 commit f9b10ba

File tree

6 files changed

+13
-13
lines changed

6 files changed

+13
-13
lines changed

src/Symfony/Component/HttpKernel/Event/RequestFinishedEvent.php renamed to src/Symfony/Component/HttpKernel/Event/FinishRequestEvent.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,6 @@
1616
*
1717
* @author Benjamin Eberlei <kontakt@beberlei.de>
1818
*/
19-
class RequestFinishedEvent extends KernelEvent
19+
class FinishRequestEvent extends KernelEvent
2020
{
2121
}

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
namespace Symfony\Component\HttpKernel\EventListener;
1313

1414
use Symfony\Component\HttpKernel\Event\GetResponseEvent;
15-
use Symfony\Component\HttpKernel\Event\RequestFinishedEvent;
15+
use Symfony\Component\HttpKernel\Event\FinishRequestEvent;
1616
use Symfony\Component\HttpKernel\KernelEvents;
1717
use Symfony\Component\HttpKernel\RequestContext;
1818
use Symfony\Component\HttpFoundation\Request;
@@ -46,7 +46,7 @@ public function onKernelRequest(GetResponseEvent $event)
4646
$this->setRouterContext($request);
4747
}
4848

49-
public function onKernelRequestFinished(RequestFinishedEvent $event)
49+
public function onKernelFinishRequest(FinishRequestEvent $event)
5050
{
5151
$this->resetRouterContext();
5252
}
@@ -85,7 +85,7 @@ public static function getSubscribedEvents()
8585
return array(
8686
// must be registered after the Router to have access to the _locale
8787
KernelEvents::REQUEST => array(array('onKernelRequest', 16)),
88-
KernelEvents::REQUEST_FINISHED => array(array('onKernelRequestFinished', 0)),
88+
KernelEvents::FINISH_REQUEST => array(array('onKernelFinishRequest', 0)),
8989
);
9090
}
9191
}

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

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

1414
use Psr\Log\LoggerInterface;
1515
use Symfony\Component\HttpKernel\Event\GetResponseEvent;
16-
use Symfony\Component\HttpKernel\Event\RequestFinishedEvent;
16+
use Symfony\Component\HttpKernel\Event\FinishRequestEvent;
1717
use Symfony\Component\HttpKernel\KernelEvents;
1818
use Symfony\Component\HttpKernel\Exception\MethodNotAllowedHttpException;
1919
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
@@ -83,7 +83,7 @@ private function populateRoutingContext(Request $request = null)
8383
$this->request = $request;
8484
}
8585

86-
public function onKernelRequestFinished(RequestFinishedEvent $event)
86+
public function onKernelFinishRequest(FinishRequestEvent $event)
8787
{
8888
$this->populateRoutingContext($this->kernelContext->getParentRequest());
8989
}
@@ -148,7 +148,7 @@ public static function getSubscribedEvents()
148148
{
149149
return array(
150150
KernelEvents::REQUEST => array(array('onKernelRequest', 32)),
151-
KernelEvents::REQUEST_FINISHED => array(array('onKernelRequestFinished', 0)),
151+
KernelEvents::FINISH_REQUEST => array(array('onKernelFinishRequest', 0)),
152152
);
153153
}
154154
}

src/Symfony/Component/HttpKernel/HttpKernel.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
use Symfony\Component\HttpKernel\Exception\HttpExceptionInterface;
1717
use Symfony\Component\HttpKernel\Event\FilterControllerEvent;
1818
use Symfony\Component\HttpKernel\Event\FilterResponseEvent;
19-
use Symfony\Component\HttpKernel\Event\RequestFinishedEvent;
19+
use Symfony\Component\HttpKernel\Event\FinishRequestEvent;
2020
use Symfony\Component\HttpKernel\Event\GetResponseEvent;
2121
use Symfony\Component\HttpKernel\Event\GetResponseForControllerResultEvent;
2222
use Symfony\Component\HttpKernel\Event\GetResponseForExceptionEvent;
@@ -183,7 +183,7 @@ private function filterResponse(Response $response, Request $request, $type)
183183
*/
184184
private function finishRequest(Request $request, $type)
185185
{
186-
$this->dispatcher->dispatch(KernelEvents::REQUEST_FINISHED, new RequestFinishedEvent($this, $request, $type));
186+
$this->dispatcher->dispatch(KernelEvents::FINISH_REQUEST, new FinishRequestEvent($this, $request, $type));
187187
$this->requestStack->pop();
188188
}
189189

src/Symfony/Component/HttpKernel/KernelEvents.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,5 +111,5 @@ final class KernelEvents
111111
*
112112
* @var string
113113
*/
114-
const REQUEST_FINISHED = 'kernel.request_finished';
114+
const FINISH_REQUEST = 'kernel.finish_request';
115115
}

src/Symfony/Component/HttpKernel/Tests/EventListener/LocaleListenerTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ public function testLocaleSetForRoutingContext()
6565
$listener->onKernelRequest($this->getEvent($request));
6666
}
6767

68-
public function testRouterResetWithParentRequestOnKernelRequestFinished()
68+
public function testRouterResetWithParentRequestOnKernelFinishRequest()
6969
{
7070
if (!class_exists('Symfony\Component\Routing\Router')) {
7171
$this->markTestSkipped('The "Routing" component is not available');
@@ -83,10 +83,10 @@ public function testRouterResetWithParentRequestOnKernelRequestFinished()
8383

8484
$this->context->expects($this->once())->method('getParentRequest')->will($this->returnValue($parentRequest));
8585

86-
$event = $this->getMock('Symfony\Component\HttpKernel\Event\RequestFinishedEvent', array(), array(), '', false);
86+
$event = $this->getMock('Symfony\Component\HttpKernel\Event\FinishRequestEvent', array(), array(), '', false);
8787

8888
$listener = new LocaleListener('fr', $this->context, $router);
89-
$listener->onKernelRequestFinished($event);
89+
$listener->onKernelFinishRequest($event);
9090
}
9191

9292
public function testRequestLocaleIsNotOverridden()

0 commit comments

Comments
 (0)
0