From 6465bfcbe0c4dea8f1d48de6aef87f910b7584be Mon Sep 17 00:00:00 2001 From: Divine Niiquaye Ibok Date: Wed, 24 Jun 2020 07:49:21 +0000 Subject: [PATCH] Removed App\Kernel call in RouterListener --- src/EventListeners/RouterListener.php | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/EventListeners/RouterListener.php b/src/EventListeners/RouterListener.php index 0fe8b17..1d0e461 100644 --- a/src/EventListeners/RouterListener.php +++ b/src/EventListeners/RouterListener.php @@ -17,7 +17,6 @@ namespace BiuradPHP\MVC\EventListeners; -use App\Kernel; use BiuradPHP\Events\Interfaces\EventSubscriberInterface; use BiuradPHP\Http\Exceptions\ClientExceptions\MethodNotAllowedException; use BiuradPHP\Http\Exceptions\ClientExceptions\NotFoundException; @@ -59,11 +58,6 @@ public function onKernelRequest(RequestEvent $event, RouteCollectorInterface $ro return; } - if ($this->container instanceof Container && \class_exists(Kernel::class)) { - // Process Some routing settings before running annotations - $this->container->callMethod([Kernel::class, 'handleRouting']); - } - $request = $event->getRequest(); // matching a request is more powerful than matching a URL path + context, so try that first