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