Exceptions
Exception
Symfony\Component\HttpKernel\Exception\ AccessDeniedHttpException
// is the Request signed?
if ($this->signer->checkRequest($request)) {
return;
}
throw new AccessDeniedHttpException();
}
public static function getSubscribedEvents(): array
{
return [
in
vendor/symfony/http-kernel/EventListener/FragmentListener.php
->
validateRequest
(line 69)
return;
}
if ($event->isMainRequest()) {
$this->validateRequest($request);
}
parse_str($request->query->get('_path', ''), $attributes);
$request->attributes->add($attributes);
$request->attributes->set('_route_params', array_replace($request->attributes->get('_route_params', []), $attributes));
in
vendor/symfony/event-dispatcher/Debug/WrappedListener.php
->
onKernelRequest
(line 118)
$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();
}
}
in
vendor/symfony/event-dispatcher/EventDispatcher.php
->
__invoke
(line 230)
foreach ($listeners as $listener) {
if ($stoppable && $event->isPropagationStopped()) {
break;
}
$listener($event, $eventName, $this);
}
}
/**
* Sorts the internal list of listeners for the given event by priority.
in
vendor/symfony/event-dispatcher/EventDispatcher.php
->
callListeners
(line 59)
} else {
$listeners = $this->getListeners($eventName);
}
if ($listeners) {
$this->callListeners($listeners, $eventName, $event);
}
return $event;
}
in
vendor/symfony/event-dispatcher/Debug/TraceableEventDispatcher.php
->
dispatch
(line 154)
try {
$this->beforeDispatch($eventName, $event);
try {
$e = $this->stopwatch->start($eventName, 'section');
try {
$this->dispatcher->dispatch($event, $eventName);
} finally {
if ($e->isStarted()) {
$e->stop();
}
}
in
vendor/symfony/http-kernel/HttpKernel.php
->
dispatch
(line 132)
{
$this->requestStack->push($request);
// request
$event = new RequestEvent($this, $request, $type);
$this->dispatcher->dispatch($event, KernelEvents::REQUEST);
if ($event->hasResponse()) {
return $this->filterResponse($event->getResponse(), $request, $type);
}
in
vendor/symfony/http-kernel/HttpKernel.php
->
handleRaw
(line 78)
public function handle(Request $request, int $type = HttpKernelInterface::MAIN_REQUEST, bool $catch = true)
{
$request->headers->set('X-Php-Ob-Level', (string) ob_get_level());
try {
return $this->handleRaw($request, $type);
} catch (\Exception $e) {
if ($e instanceof RequestExceptionInterface) {
$e = new BadRequestHttpException($e->getMessage(), $e);
}
if (false === $catch) {
in
vendor/symfony/http-kernel/Kernel.php
->
handle
(line 199)
$this->boot();
++$this->requestStackSize;
$this->resetServices = true;
try {
return $this->getHttpKernel()->handle($request, $type, $catch);
} finally {
--$this->requestStackSize;
}
}
in
vendor/symfony/runtime/Runner/Symfony/HttpKernelRunner.php
->
handle
(line 37)
$this->request = $request;
}
public function run(): int
{
$response = $this->kernel->handle($this->request);
$response->send();
if ($this->kernel instanceof TerminableInterface) {
$this->kernel->terminate($this->request, $response);
}
in
vendor/autoload_runtime.php
->
run
(line 35)
$app = $app(...$args);
exit(
$runtime
->getRunner($app)
->run()
);
<?php
use App\Kernel;
require_once dirname(__DIR__).'/vendor/autoload_runtime.php';
return function (array $context) {
return new Kernel($context['APP_ENV'], (bool) $context['APP_DEBUG']);
};
Logs
Level | Channel | Message |
---|---|---|
INFO 20:46:44 | request |
Matched route "_profiler". { "route": "_profiler", "route_parameters": { "_route": "_profiler", "_controller": "web_profiler.controller.profiler::panelAction", "token": "cceb9b" }, "request_uri": "https://lnk.d.api-com.ru/_profiler/cceb9b?panel=exception", "method": "GET" } |
Stack Trace
AccessDeniedHttpException
|
---|
Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException: at vendor/symfony/http-kernel/EventListener/FragmentListener.php:90 at Symfony\Component\HttpKernel\EventListener\FragmentListener->validateRequest() (vendor/symfony/http-kernel/EventListener/FragmentListener.php:69) at Symfony\Component\HttpKernel\EventListener\FragmentListener->onKernelRequest() (vendor/symfony/event-dispatcher/Debug/WrappedListener.php:118) at Symfony\Component\EventDispatcher\Debug\WrappedListener->__invoke() (vendor/symfony/event-dispatcher/EventDispatcher.php:230) at Symfony\Component\EventDispatcher\EventDispatcher->callListeners() (vendor/symfony/event-dispatcher/EventDispatcher.php:59) at Symfony\Component\EventDispatcher\EventDispatcher->dispatch() (vendor/symfony/event-dispatcher/Debug/TraceableEventDispatcher.php:154) at Symfony\Component\EventDispatcher\Debug\TraceableEventDispatcher->dispatch() (vendor/symfony/http-kernel/HttpKernel.php:132) at Symfony\Component\HttpKernel\HttpKernel->handleRaw() (vendor/symfony/http-kernel/HttpKernel.php:78) at Symfony\Component\HttpKernel\HttpKernel->handle() (vendor/symfony/http-kernel/Kernel.php:199) at Symfony\Component\HttpKernel\Kernel->handle() (vendor/symfony/runtime/Runner/Symfony/HttpKernelRunner.php:37) at Symfony\Component\Runtime\Runner\Symfony\HttpKernelRunner->run() (vendor/autoload_runtime.php:35) at require_once('/var/www/d.ms.apicom/vendor/autoload_runtime.php') (public/index.php:5) |