Exceptions
Stack Trace
throw new NotFoundHttpException($message, $e); } catch (MethodNotAllowedException $e) { $message = \sprintf('No route found for "%s %s": Method Not Allowed (Allow: %s)', $request->getMethod(), $request->getUriForPath($request->getPathInfo()), implode(', ', $e->getAllowedMethods())); throw new MethodNotAllowedHttpException($e->getAllowedMethods(), $message, $e); }}public function onKernelException(ExceptionEvent $event): void{
RouterListener->onKernelRequest(RequestEvent, 'kernel.request', TraceableEventDispatcher)
in
vendor/symfony/event-dispatcher/Debug/WrappedListener.php
(line 122)
$this->priority ??= $dispatcher->getListenerPriority($eventName, $this->listener);$e = $this->stopwatch->start($this->name, 'event_listener');try { ($this->optimizedListener ?? $this->listener)($event, $eventName, $dispatcher);} finally { if ($e->isStarted()) { $e->stop(); }}
WrappedListener->__invoke(RequestEvent, 'kernel.request', TraceableEventDispatcher)
in
vendor/symfony/event-dispatcher/Debug/TraceableEventDispatcher.php
(line 115)
foreach ($listeners as $listener) { if ($stoppable && $event->isPropagationStopped()) { break; } $listener($event, $eventName, $this); }} finally { if ($e->isStarted()) { $e->stop(); }
TraceableEventDispatcher->dispatch(RequestEvent, 'kernel.request')
in
vendor/symfony/http-kernel/HttpKernel.php
(line 174)
*/private function handleRaw(Request $request, int $type = self::MAIN_REQUEST, ?ControllerMetadata &$controllerMetadata = null): Response{ // request $event = new RequestEvent($this, $request, $type); $this->dispatcher->dispatch($event, KernelEvents::REQUEST); if ($event->hasResponse()) { return $this->filterResponse($event->getResponse(), $request, $type); }$request->headers->set('X-Php-Ob-Level', (string) ob_get_level());$this->requestStack->push($request);$response = null;try { return $response = $this->handleRaw($request, $type, $controllerMetadata);} catch (\Throwable $e) { if ($e instanceof \Error && !$this->handleAllThrowables) { throw $e; } if (!$this->handlingHttpCache) { $this->resetServices = true; } try { return $this->getHttpKernel()->handle($request, $type, $catch); } finally { --$this->requestStackSize; }}// Merge the environment variables coming from DotEnv with the ones tied to the current request$_SERVER += $server;if ($this->application instanceof HttpKernelInterface) { $sfRequest = Request::createFromGlobals(); $sfResponse = $this->application->handle($sfRequest);} else { $sfResponse = $this->application;}try {
FrankenPhpWorkerRunner->{closure:Symfony\Component\Runtime\Runner\FrankenPhpWorkerRunner::run():53}()
frankenphp_handle_request(Closure)
in
vendor/symfony/runtime/Runner/FrankenPhpWorkerRunner.php
(line 85)
}};$loops = 0;do { $ret = frankenphp_handle_request($handler); if (null !== $terminationException) { throw $terminationException; } $sfRequest = $sfResponse = null;$app = $app(...$args);exit( $runtime ->getRunner($app) ->run());<?phpuse App\Kernel;require_once dirname(__DIR__).'/vendor/autoload_runtime.php';return function (array $context) { return new Kernel($context['APP_ENV'], (bool) $context['APP_DEBUG']);};
Symfony\Component\HttpKernel\Exception\MethodNotAllowedHttpException:
No route found for "POST https://esya.ru/mcp": Method Not Allowed (Allow: GET)
at vendor/symfony/http-kernel/EventListener/RouterListener.php:220
at Symfony\Component\HttpKernel\EventListener\RouterListener->onKernelRequest(object(RequestEvent), 'kernel.request', object(TraceableEventDispatcher))
(vendor/symfony/event-dispatcher/Debug/WrappedListener.php:122)
at Symfony\Component\EventDispatcher\Debug\WrappedListener->__invoke(object(RequestEvent), 'kernel.request', object(TraceableEventDispatcher))
(vendor/symfony/event-dispatcher/Debug/TraceableEventDispatcher.php:115)
at Symfony\Component\EventDispatcher\Debug\TraceableEventDispatcher->dispatch(object(RequestEvent), 'kernel.request')
(vendor/symfony/http-kernel/HttpKernel.php:174)
at Symfony\Component\HttpKernel\HttpKernel->handleRaw(object(Request), 1, null)
(vendor/symfony/http-kernel/HttpKernel.php:80)
at Symfony\Component\HttpKernel\HttpKernel->handle(object(Request), 1, true)
(vendor/symfony/http-kernel/Kernel.php:156)
at Symfony\Component\HttpKernel\Kernel->handle(object(Request))
(vendor/symfony/runtime/Runner/FrankenPhpWorkerRunner.php:64)
at Symfony\Component\Runtime\Runner\FrankenPhpWorkerRunner->{closure:Symfony\Component\Runtime\Runner\FrankenPhpWorkerRunner::run():53}()
at frankenphp_handle_request(object(Closure))
(vendor/symfony/runtime/Runner/FrankenPhpWorkerRunner.php:85)
at Symfony\Component\Runtime\Runner\FrankenPhpWorkerRunner->run()
(vendor/autoload_runtime.php:32)
at require_once('/app/vendor/autoload_runtime.php')
(public/index.php:5)Stack Trace
$allow = $allowSchemes = $trailingSlashSchemes = [];if ($ret = $this->doMatch($pathinfo, $allow, $allowSchemes, $trailingSlashSchemes)) { return $ret;}if ($allow) { throw new MethodNotAllowedException(array_keys($allow));}if (!$this instanceof RedirectableUrlMatcherInterface) { throw new ResourceNotFoundException(\sprintf('No routes found for "%s".', $pathinfo));}if (!\in_array($this->context->getMethod(), ['HEAD', 'GET'], true)) { $this->request = $request; $originalContext = $this->context; $this->context = (clone $originalContext)->fromRequest($request); try { return $this->match($request->getPathInfo()); } finally { $this->context = $originalContext; $this->request = null; }} if (!$matcher instanceof RequestMatcherInterface) { // fallback to the default UrlMatcherInterface return $matcher->match($request->getPathInfo()); } return $matcher->matchRequest($request);}/** * Gets the UrlMatcher or RequestMatcher instance associated with this Router. */
Router->matchRequest(Request)
in
vendor/symfony/http-kernel/EventListener/RouterListener.php
(line 134)
// add attributes based on the request (routing)try { // matching a request is more powerful than matching a URL path + context, so try that first if ($this->matcher instanceof RequestMatcherInterface) { $parameters = $this->matcher->matchRequest($request); } else { $parameters = $this->matcher->match($request->getPathInfo()); } $this->logger?->info('Matched route "{route}".', [
RouterListener->onKernelRequest(RequestEvent, 'kernel.request', TraceableEventDispatcher)
in
vendor/symfony/event-dispatcher/Debug/WrappedListener.php
(line 122)
$this->priority ??= $dispatcher->getListenerPriority($eventName, $this->listener);$e = $this->stopwatch->start($this->name, 'event_listener');try { ($this->optimizedListener ?? $this->listener)($event, $eventName, $dispatcher);} finally { if ($e->isStarted()) { $e->stop(); }}
WrappedListener->__invoke(RequestEvent, 'kernel.request', TraceableEventDispatcher)
in
vendor/symfony/event-dispatcher/Debug/TraceableEventDispatcher.php
(line 115)
foreach ($listeners as $listener) { if ($stoppable && $event->isPropagationStopped()) { break; } $listener($event, $eventName, $this); }} finally { if ($e->isStarted()) { $e->stop(); }
TraceableEventDispatcher->dispatch(RequestEvent, 'kernel.request')
in
vendor/symfony/http-kernel/HttpKernel.php
(line 174)
*/private function handleRaw(Request $request, int $type = self::MAIN_REQUEST, ?ControllerMetadata &$controllerMetadata = null): Response{ // request $event = new RequestEvent($this, $request, $type); $this->dispatcher->dispatch($event, KernelEvents::REQUEST); if ($event->hasResponse()) { return $this->filterResponse($event->getResponse(), $request, $type); }$request->headers->set('X-Php-Ob-Level', (string) ob_get_level());$this->requestStack->push($request);$response = null;try { return $response = $this->handleRaw($request, $type, $controllerMetadata);} catch (\Throwable $e) { if ($e instanceof \Error && !$this->handleAllThrowables) { throw $e; } if (!$this->handlingHttpCache) { $this->resetServices = true; } try { return $this->getHttpKernel()->handle($request, $type, $catch); } finally { --$this->requestStackSize; }}// Merge the environment variables coming from DotEnv with the ones tied to the current request$_SERVER += $server;if ($this->application instanceof HttpKernelInterface) { $sfRequest = Request::createFromGlobals(); $sfResponse = $this->application->handle($sfRequest);} else { $sfResponse = $this->application;}try {
FrankenPhpWorkerRunner->{closure:Symfony\Component\Runtime\Runner\FrankenPhpWorkerRunner::run():53}()
frankenphp_handle_request(Closure)
in
vendor/symfony/runtime/Runner/FrankenPhpWorkerRunner.php
(line 85)
}};$loops = 0;do { $ret = frankenphp_handle_request($handler); if (null !== $terminationException) { throw $terminationException; } $sfRequest = $sfResponse = null;$app = $app(...$args);exit( $runtime ->getRunner($app) ->run());<?phpuse App\Kernel;require_once dirname(__DIR__).'/vendor/autoload_runtime.php';return function (array $context) { return new Kernel($context['APP_ENV'], (bool) $context['APP_DEBUG']);};
Symfony\Component\Routing\Exception\MethodNotAllowedException:
at vendor/symfony/routing/Matcher/Dumper/CompiledUrlMatcherTrait.php:42
at Symfony\Component\Routing\Matcher\CompiledUrlMatcher->match('/mcp')
(vendor/symfony/routing/Matcher/UrlMatcher.php:102)
at Symfony\Component\Routing\Matcher\UrlMatcher->matchRequest(object(Request))
(vendor/symfony/routing/Router.php:188)
at Symfony\Component\Routing\Router->matchRequest(object(Request))
(vendor/symfony/http-kernel/EventListener/RouterListener.php:134)
at Symfony\Component\HttpKernel\EventListener\RouterListener->onKernelRequest(object(RequestEvent), 'kernel.request', object(TraceableEventDispatcher))
(vendor/symfony/event-dispatcher/Debug/WrappedListener.php:122)
at Symfony\Component\EventDispatcher\Debug\WrappedListener->__invoke(object(RequestEvent), 'kernel.request', object(TraceableEventDispatcher))
(vendor/symfony/event-dispatcher/Debug/TraceableEventDispatcher.php:115)
at Symfony\Component\EventDispatcher\Debug\TraceableEventDispatcher->dispatch(object(RequestEvent), 'kernel.request')
(vendor/symfony/http-kernel/HttpKernel.php:174)
at Symfony\Component\HttpKernel\HttpKernel->handleRaw(object(Request), 1, null)
(vendor/symfony/http-kernel/HttpKernel.php:80)
at Symfony\Component\HttpKernel\HttpKernel->handle(object(Request), 1, true)
(vendor/symfony/http-kernel/Kernel.php:156)
at Symfony\Component\HttpKernel\Kernel->handle(object(Request))
(vendor/symfony/runtime/Runner/FrankenPhpWorkerRunner.php:64)
at Symfony\Component\Runtime\Runner\FrankenPhpWorkerRunner->{closure:Symfony\Component\Runtime\Runner\FrankenPhpWorkerRunner::run():53}()
at frankenphp_handle_request(object(Closure))
(vendor/symfony/runtime/Runner/FrankenPhpWorkerRunner.php:85)
at Symfony\Component\Runtime\Runner\FrankenPhpWorkerRunner->run()
(vendor/autoload_runtime.php:32)
at require_once('/app/vendor/autoload_runtime.php')
(public/index.php:5)