Skip to content

Commit 2c0bbe3

Browse files
committed
minor #47472 Removed unused $event param of onKernelFinishRequest from RouterListener (githubfromgui)
This PR was merged into the 6.2 branch. Discussion ---------- Removed unused $event param of onKernelFinishRequest from RouterListener | Q | A | ------------- | --- | Branch? | 6.2 | Bug fix? | no | New feature? | no | Deprecations? | no | License | MIT The `$event` parameter in the `onKernelFinishRequest` for the `RouterListener` class seems to not be used. Other listeners such as `LocaleAwareListener`, `Firewall` and `FirewallListener` all takes advantage of this $event parameter. `Symfony\Component\HttpKernel\EventListener\LocaleAwareListener`: ![image](https://user-images.githubusercontent.com/5428251/188231452-d5cd0772-0cc2-4e94-85d9-cea7f34edf95.png) `Symfony\Component\Security\Http\Firewall`: ![image](https://user-images.githubusercontent.com/5428251/188230787-9e4a35cf-8c7f-45ab-93de-8d1d8a35bbc4.png) `Symfony\Bundle\SecurityBundle\EventListener\FirewallListener`: ![image](https://user-images.githubusercontent.com/5428251/188231264-2d99f76e-f2f4-4c21-af37-196e3f21f788.png) Plus, I could not find any Interface that ensures any contract over this method to all these classes above. Commits ------- 3ff970677d Removed unused the $event parameter of onKernelFinishRequest from RouterListener.
2 parents bbd3834 + 22e3856 commit 2c0bbe3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

EventListener/RouterListener.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ private function setCurrentRequest(?Request $request)
8383
* After a sub-request is done, we need to reset the routing context to the parent request so that the URL generator
8484
* operates on the correct context again.
8585
*/
86-
public function onKernelFinishRequest(FinishRequestEvent $event)
86+
public function onKernelFinishRequest()
8787
{
8888
$this->setCurrentRequest($this->requestStack->getParentRequest());
8989
}

0 commit comments

Comments
 (0)