}
try {
$callable = $this->createController($controller);
} catch (\InvalidArgumentException $e) {
throw new \InvalidArgumentException(sprintf('The controller for URI "%s" is not callable: ', $request->getPathInfo()).$e->getMessage(), 0, $e);
}
if (!\is_callable($callable)) {
throw new \InvalidArgumentException(sprintf('The controller for URI "%s" is not callable: ', $request->getPathInfo()).$this->getControllerError($callable));
}
if ($event->hasResponse()) {
return $this->filterResponse($event->getResponse(), $request, $type);
}
// load controller
if (false === $controller = $this->resolver->getController($request)) {
throw new NotFoundHttpException(sprintf('Unable to find the controller for path "%s". The route is wrongly configured.', $request->getPathInfo()));
}
$event = new ControllerEvent($this, $controller, $request, $type);
$this->dispatcher->dispatch($event, KernelEvents::CONTROLLER);
public function handle(Request $request, int $type = HttpKernelInterface::MASTER_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) {
$exception = $event->getThrowable();
$request = $this->duplicateRequest($exception, $event->getRequest());
try {
$response = $event->getKernel()->handle($request, HttpKernelInterface::SUB_REQUEST, false);
} catch (\Exception $e) {
$f = FlattenException::createFromThrowable($e);
$this->logException($e, sprintf('Exception thrown when handling an exception (%s: %s at %s line %s)', $f->getClass(), $f->getMessage(), $e->getFile(), $e->getLine()));
* @throws \Exception
*/
private function handleThrowable(\Throwable $e, Request $request, int $type): Response
{
$event = new ExceptionEvent($this, $request, $type, $e);
$this->dispatcher->dispatch($event, KernelEvents::EXCEPTION);
// a listener might have replaced the exception
$e = $event->getThrowable();
if (!$event->hasResponse()) {
if (1 === substr_count($controller, ':')) {
$controller = str_replace(':', '::', $controller);
trigger_deprecation('symfony/http-kernel', '5.1', 'Referencing controllers with a single colon is deprecated. Use "%s" instead.', $controller);
}
return parent::createController($controller);
}
/**
* {@inheritdoc}
*/
if (\function_exists($controller)) {
return $controller;
}
try {
$callable = $this->createController($controller);
} catch (\InvalidArgumentException $e) {
throw new \InvalidArgumentException(sprintf('The controller for URI "%s" is not callable: ', $request->getPathInfo()).$e->getMessage(), 0, $e);
}
if (!\is_callable($callable)) {
if ($event->hasResponse()) {
return $this->filterResponse($event->getResponse(), $request, $type);
}
// load controller
if (false === $controller = $this->resolver->getController($request)) {
throw new NotFoundHttpException(sprintf('Unable to find the controller for path "%s". The route is wrongly configured.', $request->getPathInfo()));
}
$event = new ControllerEvent($this, $controller, $request, $type);
$this->dispatcher->dispatch($event, KernelEvents::CONTROLLER);
public function handle(Request $request, int $type = HttpKernelInterface::MASTER_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) {
$exception = $event->getThrowable();
$request = $this->duplicateRequest($exception, $event->getRequest());
try {
$response = $event->getKernel()->handle($request, HttpKernelInterface::SUB_REQUEST, false);
} catch (\Exception $e) {
$f = FlattenException::createFromThrowable($e);
$this->logException($e, sprintf('Exception thrown when handling an exception (%s: %s at %s line %s)', $f->getClass(), $f->getMessage(), $e->getFile(), $e->getLine()));
* @throws \Exception
*/
private function handleThrowable(\Throwable $e, Request $request, int $type): Response
{
$event = new ExceptionEvent($this, $request, $type, $e);
$this->dispatcher->dispatch($event, KernelEvents::EXCEPTION);
// a listener might have replaced the exception
$e = $event->getThrowable();
if (!$event->hasResponse()) {
}
try {
$callable = $this->createController($controller);
} catch (\InvalidArgumentException $e) {
throw new \InvalidArgumentException(sprintf('The controller for URI "%s" is not callable: ', $request->getPathInfo()).$e->getMessage(), 0, $e);
}
if (!\is_callable($callable)) {
throw new \InvalidArgumentException(sprintf('The controller for URI "%s" is not callable: ', $request->getPathInfo()).$this->getControllerError($callable));
}
if ($event->hasResponse()) {
return $this->filterResponse($event->getResponse(), $request, $type);
}
// load controller
if (false === $controller = $this->resolver->getController($request)) {
throw new NotFoundHttpException(sprintf('Unable to find the controller for path "%s". The route is wrongly configured.', $request->getPathInfo()));
}
$event = new ControllerEvent($this, $controller, $request, $type);
$this->dispatcher->dispatch($event, KernelEvents::CONTROLLER);
public function handle(Request $request, int $type = HttpKernelInterface::MASTER_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) {
$exception = $event->getThrowable();
$request = $this->duplicateRequest($exception, $event->getRequest());
try {
$response = $event->getKernel()->handle($request, HttpKernelInterface::SUB_REQUEST, false);
} catch (\Exception $e) {
$f = FlattenException::createFromThrowable($e);
$this->logException($e, sprintf('Exception thrown when handling an exception (%s: %s at %s line %s)', $f->getClass(), $f->getMessage(), $e->getFile(), $e->getLine()));
* @throws \Exception
*/
private function handleThrowable(\Throwable $e, Request $request, int $type): Response
{
$event = new ExceptionEvent($this, $request, $type, $e);
$this->dispatcher->dispatch($event, KernelEvents::EXCEPTION);
// a listener might have replaced the exception
$e = $event->getThrowable();
if (!$event->hasResponse()) {
if (1 === substr_count($controller, ':')) {
$controller = str_replace(':', '::', $controller);
trigger_deprecation('symfony/http-kernel', '5.1', 'Referencing controllers with a single colon is deprecated. Use "%s" instead.', $controller);
}
return parent::createController($controller);
}
/**
* {@inheritdoc}
*/
if (\function_exists($controller)) {
return $controller;
}
try {
$callable = $this->createController($controller);
} catch (\InvalidArgumentException $e) {
throw new \InvalidArgumentException(sprintf('The controller for URI "%s" is not callable: ', $request->getPathInfo()).$e->getMessage(), 0, $e);
}
if (!\is_callable($callable)) {
if ($event->hasResponse()) {
return $this->filterResponse($event->getResponse(), $request, $type);
}
// load controller
if (false === $controller = $this->resolver->getController($request)) {
throw new NotFoundHttpException(sprintf('Unable to find the controller for path "%s". The route is wrongly configured.', $request->getPathInfo()));
}
$event = new ControllerEvent($this, $controller, $request, $type);
$this->dispatcher->dispatch($event, KernelEvents::CONTROLLER);
public function handle(Request $request, int $type = HttpKernelInterface::MASTER_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) {
$exception = $event->getThrowable();
$request = $this->duplicateRequest($exception, $event->getRequest());
try {
$response = $event->getKernel()->handle($request, HttpKernelInterface::SUB_REQUEST, false);
} catch (\Exception $e) {
$f = FlattenException::createFromThrowable($e);
$this->logException($e, sprintf('Exception thrown when handling an exception (%s: %s at %s line %s)', $f->getClass(), $f->getMessage(), $e->getFile(), $e->getLine()));
* @throws \Exception
*/
private function handleThrowable(\Throwable $e, Request $request, int $type): Response
{
$event = new ExceptionEvent($this, $request, $type, $e);
$this->dispatcher->dispatch($event, KernelEvents::EXCEPTION);
// a listener might have replaced the exception
$e = $event->getThrowable();
if (!$event->hasResponse()) {
* @param Request $request
* @return Response
*/
public function unitAction(Request $request, $unitId)
{
$entry = $this->CMS_CLIENT->getEntry($request, $unitId, 3, 'fields.slug', 'unit');
return $this->CMS_CLIENT->getPage($request, 'templates/UnitPage.html.twig', $entry, $this->getGlobalParams($request));
}
/**
* @Route("/{unitId}/{projectId}", defaults={"_format": "html"}, name="project", requirements={"_format": "html"})
$this->dispatcher->dispatch($event, KernelEvents::CONTROLLER_ARGUMENTS);
$controller = $event->getController();
$arguments = $event->getArguments();
// call controller
$response = $controller(...$arguments);
// view
if (!$response instanceof Response) {
$event = new ViewEvent($this, $request, $type, $response);
$this->dispatcher->dispatch($event, KernelEvents::VIEW);
public function handle(Request $request, int $type = HttpKernelInterface::MASTER_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) {
[5/5] InvalidArgumentException |
---|
InvalidArgumentException: The controller for URI "/ss20" is not callable: Expected method "showException" on class "App\Controller\DefaultController". Available methods: "showFullDataJSONAction", "proofreadingAction", "proofreadingUnitAction", "pusherAuthAction", "indexAction", "programmeDataJSONAction", "showDataJSONAction", "aboutAction", "memorialAction", "programmesAction", "contactAction", "eventsAction", "unitAction", "projectAction", "setupRender", "setContainer", "getSubscribedServices". at /app/vendor/symfony/http-kernel/Controller/ControllerResolver.php:88 at Symfony\Component\HttpKernel\Controller\ControllerResolver->getController() (/app/vendor/symfony/http-kernel/Controller/TraceableControllerResolver.php:38) at Symfony\Component\HttpKernel\Controller\TraceableControllerResolver->getController() (/app/vendor/symfony/http-kernel/HttpKernel.php:140) at Symfony\Component\HttpKernel\HttpKernel->handleRaw() (/app/vendor/symfony/http-kernel/HttpKernel.php:79) at Symfony\Component\HttpKernel\HttpKernel->handle() (/app/vendor/symfony/http-kernel/EventListener/ErrorListener.php:60) at Symfony\Component\HttpKernel\EventListener\ErrorListener->onKernelException() (/app/vendor/symfony/event-dispatcher/Debug/WrappedListener.php:117) at Symfony\Component\EventDispatcher\Debug\WrappedListener->__invoke() (/app/vendor/symfony/event-dispatcher/EventDispatcher.php:230) at Symfony\Component\EventDispatcher\EventDispatcher->callListeners() (/app/vendor/symfony/event-dispatcher/EventDispatcher.php:59) at Symfony\Component\EventDispatcher\EventDispatcher->dispatch() (/app/vendor/symfony/event-dispatcher/Debug/TraceableEventDispatcher.php:151) at Symfony\Component\EventDispatcher\Debug\TraceableEventDispatcher->dispatch() (/app/vendor/symfony/http-kernel/HttpKernel.php:218) at Symfony\Component\HttpKernel\HttpKernel->handleThrowable() (/app/vendor/symfony/http-kernel/HttpKernel.php:111) at Symfony\Component\HttpKernel\HttpKernel->terminateWithException() (/app/vendor/symfony/http-kernel/EventListener/DebugHandlersListener.php:127) at Symfony\Component\HttpKernel\EventListener\DebugHandlersListener::Symfony\Component\HttpKernel\EventListener\{closure}() (/app/vendor/symfony/error-handler/ErrorHandler.php:594) at Symfony\Component\ErrorHandler\ErrorHandler->handleException() |
[4/5] InvalidArgumentException |
---|
InvalidArgumentException: Expected method "showException" on class "App\Controller\DefaultController". Available methods: "showFullDataJSONAction", "proofreadingAction", "proofreadingUnitAction", "pusherAuthAction", "indexAction", "programmeDataJSONAction", "showDataJSONAction", "aboutAction", "memorialAction", "programmesAction", "contactAction", "eventsAction", "unitAction", "projectAction", "setupRender", "setContainer", "getSubscribedServices". at /app/vendor/symfony/http-kernel/Controller/ControllerResolver.php:134 at Symfony\Component\HttpKernel\Controller\ControllerResolver->createController() (/app/vendor/symfony/http-kernel/Controller/ContainerControllerResolver.php:42) at Symfony\Component\HttpKernel\Controller\ContainerControllerResolver->createController() (/app/vendor/symfony/http-kernel/Controller/ControllerResolver.php:86) at Symfony\Component\HttpKernel\Controller\ControllerResolver->getController() (/app/vendor/symfony/http-kernel/Controller/TraceableControllerResolver.php:38) at Symfony\Component\HttpKernel\Controller\TraceableControllerResolver->getController() (/app/vendor/symfony/http-kernel/HttpKernel.php:140) at Symfony\Component\HttpKernel\HttpKernel->handleRaw() (/app/vendor/symfony/http-kernel/HttpKernel.php:79) at Symfony\Component\HttpKernel\HttpKernel->handle() (/app/vendor/symfony/http-kernel/EventListener/ErrorListener.php:60) at Symfony\Component\HttpKernel\EventListener\ErrorListener->onKernelException() (/app/vendor/symfony/event-dispatcher/Debug/WrappedListener.php:117) at Symfony\Component\EventDispatcher\Debug\WrappedListener->__invoke() (/app/vendor/symfony/event-dispatcher/EventDispatcher.php:230) at Symfony\Component\EventDispatcher\EventDispatcher->callListeners() (/app/vendor/symfony/event-dispatcher/EventDispatcher.php:59) at Symfony\Component\EventDispatcher\EventDispatcher->dispatch() (/app/vendor/symfony/event-dispatcher/Debug/TraceableEventDispatcher.php:151) at Symfony\Component\EventDispatcher\Debug\TraceableEventDispatcher->dispatch() (/app/vendor/symfony/http-kernel/HttpKernel.php:218) at Symfony\Component\HttpKernel\HttpKernel->handleThrowable() (/app/vendor/symfony/http-kernel/HttpKernel.php:111) at Symfony\Component\HttpKernel\HttpKernel->terminateWithException() (/app/vendor/symfony/http-kernel/EventListener/DebugHandlersListener.php:127) at Symfony\Component\HttpKernel\EventListener\DebugHandlersListener::Symfony\Component\HttpKernel\EventListener\{closure}() (/app/vendor/symfony/error-handler/ErrorHandler.php:594) at Symfony\Component\ErrorHandler\ErrorHandler->handleException() |
[3/5] InvalidArgumentException |
---|
InvalidArgumentException: The controller for URI "/ss20" is not callable: Expected method "showException" on class "App\Controller\DefaultController". Available methods: "showFullDataJSONAction", "proofreadingAction", "proofreadingUnitAction", "pusherAuthAction", "indexAction", "programmeDataJSONAction", "showDataJSONAction", "aboutAction", "memorialAction", "programmesAction", "contactAction", "eventsAction", "unitAction", "projectAction", "setupRender", "setContainer", "getSubscribedServices". at /app/vendor/symfony/http-kernel/Controller/ControllerResolver.php:88 at Symfony\Component\HttpKernel\Controller\ControllerResolver->getController() (/app/vendor/symfony/http-kernel/Controller/TraceableControllerResolver.php:38) at Symfony\Component\HttpKernel\Controller\TraceableControllerResolver->getController() (/app/vendor/symfony/http-kernel/HttpKernel.php:140) at Symfony\Component\HttpKernel\HttpKernel->handleRaw() (/app/vendor/symfony/http-kernel/HttpKernel.php:79) at Symfony\Component\HttpKernel\HttpKernel->handle() (/app/vendor/symfony/http-kernel/EventListener/ErrorListener.php:60) at Symfony\Component\HttpKernel\EventListener\ErrorListener->onKernelException() (/app/vendor/symfony/event-dispatcher/Debug/WrappedListener.php:117) at Symfony\Component\EventDispatcher\Debug\WrappedListener->__invoke() (/app/vendor/symfony/event-dispatcher/EventDispatcher.php:230) at Symfony\Component\EventDispatcher\EventDispatcher->callListeners() (/app/vendor/symfony/event-dispatcher/EventDispatcher.php:59) at Symfony\Component\EventDispatcher\EventDispatcher->dispatch() (/app/vendor/symfony/event-dispatcher/Debug/TraceableEventDispatcher.php:151) at Symfony\Component\EventDispatcher\Debug\TraceableEventDispatcher->dispatch() (/app/vendor/symfony/http-kernel/HttpKernel.php:218) at Symfony\Component\HttpKernel\HttpKernel->handleThrowable() (/app/vendor/symfony/http-kernel/HttpKernel.php:90) at Symfony\Component\HttpKernel\HttpKernel->handle() (/app/vendor/symfony/http-kernel/Kernel.php:196) at Symfony\Component\HttpKernel\Kernel->handle() (/app/public/index.php:27) |
[2/5] InvalidArgumentException |
---|
InvalidArgumentException: Expected method "showException" on class "App\Controller\DefaultController". Available methods: "showFullDataJSONAction", "proofreadingAction", "proofreadingUnitAction", "pusherAuthAction", "indexAction", "programmeDataJSONAction", "showDataJSONAction", "aboutAction", "memorialAction", "programmesAction", "contactAction", "eventsAction", "unitAction", "projectAction", "setupRender", "setContainer", "getSubscribedServices". at /app/vendor/symfony/http-kernel/Controller/ControllerResolver.php:134 at Symfony\Component\HttpKernel\Controller\ControllerResolver->createController() (/app/vendor/symfony/http-kernel/Controller/ContainerControllerResolver.php:42) at Symfony\Component\HttpKernel\Controller\ContainerControllerResolver->createController() (/app/vendor/symfony/http-kernel/Controller/ControllerResolver.php:86) at Symfony\Component\HttpKernel\Controller\ControllerResolver->getController() (/app/vendor/symfony/http-kernel/Controller/TraceableControllerResolver.php:38) at Symfony\Component\HttpKernel\Controller\TraceableControllerResolver->getController() (/app/vendor/symfony/http-kernel/HttpKernel.php:140) at Symfony\Component\HttpKernel\HttpKernel->handleRaw() (/app/vendor/symfony/http-kernel/HttpKernel.php:79) at Symfony\Component\HttpKernel\HttpKernel->handle() (/app/vendor/symfony/http-kernel/EventListener/ErrorListener.php:60) at Symfony\Component\HttpKernel\EventListener\ErrorListener->onKernelException() (/app/vendor/symfony/event-dispatcher/Debug/WrappedListener.php:117) at Symfony\Component\EventDispatcher\Debug\WrappedListener->__invoke() (/app/vendor/symfony/event-dispatcher/EventDispatcher.php:230) at Symfony\Component\EventDispatcher\EventDispatcher->callListeners() (/app/vendor/symfony/event-dispatcher/EventDispatcher.php:59) at Symfony\Component\EventDispatcher\EventDispatcher->dispatch() (/app/vendor/symfony/event-dispatcher/Debug/TraceableEventDispatcher.php:151) at Symfony\Component\EventDispatcher\Debug\TraceableEventDispatcher->dispatch() (/app/vendor/symfony/http-kernel/HttpKernel.php:218) at Symfony\Component\HttpKernel\HttpKernel->handleThrowable() (/app/vendor/symfony/http-kernel/HttpKernel.php:90) at Symfony\Component\HttpKernel\HttpKernel->handle() (/app/vendor/symfony/http-kernel/Kernel.php:196) at Symfony\Component\HttpKernel\Kernel->handle() (/app/public/index.php:27) |
[1/5] NotFoundHttpException |
---|
Symfony\Component\HttpKernel\Exception\NotFoundHttpException: at /app/src/HelloMonday/Contentful/ContentfulClient.php:141 at App\HelloMonday\Contentful\ContentfulClient->getEntry() (/app/src/Controller/DefaultController.php:214) at App\Controller\DefaultController->unitAction() (/app/vendor/symfony/http-kernel/HttpKernel.php:157) at Symfony\Component\HttpKernel\HttpKernel->handleRaw() (/app/vendor/symfony/http-kernel/HttpKernel.php:79) at Symfony\Component\HttpKernel\HttpKernel->handle() (/app/vendor/symfony/http-kernel/Kernel.php:196) at Symfony\Component\HttpKernel\Kernel->handle() (/app/public/index.php:27) |