Exceptions

Controller "App%5CAction%5CAdmin%5CUserCrudController" does neither exist as service nor as class.

  • Exceptions 2
  • Logs
  • Stack Traces 2

InvalidArgumentException

  1.         if ($e instanceof \ArgumentCountError) {
  2.             throw new \InvalidArgumentException(sprintf('Controller "%s" has required constructor arguments and does not exist in the container. Did you forget to define the controller as a service?'$class), 0$e);
  3.         }
  4.         throw new \InvalidArgumentException(sprintf('Controller "%s" does neither exist as service nor as class.'$class), 0$e);
  5.     }
  6.     private function throwExceptionIfControllerWasRemoved(string $controller, \Throwable $previous)
  7.     {
  8.         if ($this->container instanceof Container && isset($this->container->getRemovedIds()[$controller])) {
  1.     /**
  2.      * {@inheritdoc}
  3.      */
  4.     protected function instantiateController(string $class): object
  5.     {
  6.         $controller parent::instantiateController($class);
  7.         if ($controller instanceof ContainerAwareInterface) {
  8.             $controller->setContainer($this->container);
  9.         }
  10.         if ($controller instanceof AbstractController) {
  1.         }
  2.         if (\is_array($controller)) {
  3.             if (isset($controller[0]) && \is_string($controller[0]) && isset($controller[1])) {
  4.                 try {
  5.                     $controller[0] = $this->instantiateController($controller[0]);
  6.                 } catch (\Error|\LogicException $e) {
  7.                     try {
  8.                         // We cannot just check is_callable but have to use reflection because a non-static method
  9.                         // can still be called statically in PHP but we don't want that. This is deprecated in PHP 7, so we
  10.                         // could simplify this with PHP 8.
  1.      */
  2.     public function getController(Request $request)
  3.     {
  4.         $e $this->stopwatch->start('controller.get_callable');
  5.         $ret $this->resolver->getController($request);
  6.         $e->stop();
  7.         return $ret;
  8.     }
  1.         if (null === $controllerFqcn || null === $controllerAction) {
  2.             return null;
  3.         }
  4.         $newRequest $request->duplicate(nullnull, ['_controller' => [$controllerFqcn$controllerAction]]);
  5.         $controllerCallable $this->controllerResolver->getController($newRequest);
  6.         if (false === $controllerCallable) {
  7.             throw new NotFoundHttpException(sprintf('Unable to find the controller "%s::%s".'$controllerFqcn$controllerAction));
  8.         }
  1.         return $this->getController(DashboardControllerInterface::class, $dashboardControllerFqcn'index'$request);
  2.     }
  3.     private function getCrudController(?string $crudControllerFqcn, ?string $crudActionRequest $request): ?CrudControllerInterface
  4.     {
  5.         return $this->getController(CrudControllerInterface::class, $crudControllerFqcn$crudAction$request);
  6.     }
  7.     private function getController(string $controllerInterface, ?string $controllerFqcn, ?string $controllerActionRequest $request)
  8.     {
  9.         if (null === $controllerFqcn || null === $controllerAction) {
  1.     {
  2.         if (null === $crudControllerFqcn) {
  3.             return null;
  4.         }
  5.         return $this->getCrudController($crudControllerFqcn$crudAction$request);
  6.     }
  7.     private function getDashboardController(?string $dashboardControllerFqcnRequest $request): ?DashboardControllerInterface
  8.     {
  9.         return $this->getController(DashboardControllerInterface::class, $dashboardControllerFqcn'index'$request);
  1.             $crudControllerFqcn $request->query->get(EA::CRUD_CONTROLLER_FQCN);
  2.         }
  3.         $crudAction $request->query->get(EA::CRUD_ACTION);
  4.         return $this->controllerFactory->getCrudControllerInstance($crudControllerFqcn$crudAction$request);
  5.     }
  6.     private function getSymfonyControllerFqcn(Request $request): ?string
  7.     {
  8.         $routeName $request->query->get(EA::ROUTE_NAME);
  1.         }
  2.         // creating the context is expensive, so it's created once and stored in the request
  3.         // if the current request already has an AdminContext object, do nothing
  4.         if (null === $adminContext $request->attributes->get(EA::CONTEXT_REQUEST_ATTRIBUTE)) {
  5.             $crudControllerInstance $this->getCrudControllerInstance($request);
  6.             $adminContext $this->adminContextFactory->create($request$dashboardControllerInstance$crudControllerInstance);
  7.         }
  8.         $request->attributes->set(EA::CONTEXT_REQUEST_ATTRIBUTE$adminContext);
  1.         $this->called true;
  2.         $this->priority $dispatcher->getListenerPriority($eventName$this->listener);
  3.         $e $this->stopwatch->start($this->name'event_listener');
  4.         ($this->optimizedListener ?? $this->listener)($event$eventName$dispatcher);
  5.         if ($e->isStarted()) {
  6.             $e->stop();
  7.         }
  1.         foreach ($listeners as $listener) {
  2.             if ($stoppable && $event->isPropagationStopped()) {
  3.                 break;
  4.             }
  5.             $listener($event$eventName$this);
  6.         }
  7.     }
  8.     /**
  9.      * Sorts the internal list of listeners for the given event by priority.
  1.         } else {
  2.             $listeners $this->getListeners($eventName);
  3.         }
  4.         if ($listeners) {
  5.             $this->callListeners($listeners$eventName$event);
  6.         }
  7.         return $event;
  8.     }
  1.         try {
  2.             $this->beforeDispatch($eventName$event);
  3.             try {
  4.                 $e $this->stopwatch->start($eventName'section');
  5.                 try {
  6.                     $this->dispatcher->dispatch($event$eventName);
  7.                 } finally {
  8.                     if ($e->isStarted()) {
  9.                         $e->stop();
  10.                     }
  11.                 }
  1.      */
  2.     private function handleRaw(Request $requestint $type self::MAIN_REQUEST): Response
  3.     {
  4.         // request
  5.         $event = new RequestEvent($this$request$type);
  6.         $this->dispatcher->dispatch($eventKernelEvents::REQUEST);
  7.         if ($event->hasResponse()) {
  8.             return $this->filterResponse($event->getResponse(), $request$type);
  9.         }
  1.     {
  2.         $request->headers->set('X-Php-Ob-Level', (string) ob_get_level());
  3.         $this->requestStack->push($request);
  4.         try {
  5.             return $this->handleRaw($request$type);
  6.         } catch (\Exception $e) {
  7.             if ($e instanceof RequestExceptionInterface) {
  8.                 $e = new BadRequestHttpException($e->getMessage(), $e);
  9.             }
  10.             if (false === $catch) {
  1.         $this->boot();
  2.         ++$this->requestStackSize;
  3.         $this->resetServices true;
  4.         try {
  5.             return $this->getHttpKernel()->handle($request$type$catch);
  6.         } finally {
  7.             --$this->requestStackSize;
  8.         }
  9.     }
  1.         if (!IpUtils::checkIp('127.0.0.1'$trustedProxies)) {
  2.             Request::setTrustedProxies(array_merge($trustedProxies, ['127.0.0.1']), Request::getTrustedHeaderSet());
  3.         }
  4.         try {
  5.             return $kernel->handle($request$type$catch);
  6.         } finally {
  7.             // restore global state
  8.             Request::setTrustedProxies($trustedProxies$trustedHeaderSet);
  9.         }
  10.     }
  1.         if ($this->surrogate) {
  2.             $this->surrogate->addSurrogateCapability($request);
  3.         }
  4.         // always a "master" request (as the real master request can be in cache)
  5.         $response SubRequestHandler::handle($this->kernel$requestHttpKernelInterface::MAIN_REQUEST$catch);
  6.         /*
  7.          * Support stale-if-error given on Responses or as a config option.
  8.          * RFC 7234 summarizes in Section 4.2.4 (but also mentions with the individual
  9.          * Cache-Control directives) that
  1.     protected function forward(Request $requestbool $catch falseResponse $entry null)
  2.     {
  3.         $this->getKernel()->boot();
  4.         $this->getKernel()->getContainer()->set('cache'$this);
  5.         return parent::forward($request$catch$entry);
  6.     }
  7.     /**
  8.      * Returns an array of options to customize the Cache configuration.
  9.      *
  1.         // avoid that the backend sends no content
  2.         $subRequest->headers->remove('If-Modified-Since');
  3.         $subRequest->headers->remove('If-None-Match');
  4.         $response $this->forward($subRequest$catch);
  5.         if ($response->isCacheable()) {
  6.             $this->store($request$response);
  7.         }
  1.         }
  2.         if (null === $entry) {
  3.             $this->record($request'miss');
  4.             return $this->fetch($request$catch);
  5.         }
  6.         if (!$this->isFreshEnough($request$entry)) {
  7.             $this->record($request'stale');
  1.                 reload the cache by fetching a fresh response and caching it (if possible).
  2.             */
  3.             $this->record($request'reload');
  4.             $response $this->fetch($request$catch);
  5.         } else {
  6.             $response $this->lookup($request$catch);
  7.         }
  8.         $this->restoreResponseBody($request$response);
  9.         if (HttpKernelInterface::MAIN_REQUEST === $type) {
  1.     {
  2.         if (!$this->booted) {
  3.             $container $this->container ?? $this->preBoot();
  4.             if ($container->has('http_cache')) {
  5.                 return $container->get('http_cache')->handle($request$type$catch);
  6.             }
  7.         }
  8.         $this->boot();
  9.         ++$this->requestStackSize;
  1.         $this->request $request;
  2.     }
  3.     public function run(): int
  4.     {
  5.         $response $this->kernel->handle($this->request);
  6.         $response->send();
  7.         if ($this->kernel instanceof TerminableInterface) {
  8.             $this->kernel->terminate($this->request$response);
  9.         }
in vendor/autoload_runtime.php -> run (line 35)
  1. $app $app(...$args);
  2. exit(
  3.     $runtime
  4.         ->getRunner($app)
  5.         ->run()
  6. );
require_once('/home/jumo/sites/sym/tracol/vendor/autoload_runtime.php') in public/index.php (line 5)
  1. <?php
  2. use App\Kernel;
  3. require_once dirname(__DIR__).'/vendor/autoload_runtime.php';
  4. return function (array $context) {
  5.     return new Kernel($context['APP_ENV'], (bool) $context['APP_DEBUG']);
  6. };

Error

Class 'App%5CAction%5CAdmin%5CUserCrudController' not found

  1.      *
  2.      * @return object
  3.      */
  4.     protected function instantiateController(string $class)
  5.     {
  6.         return new $class();
  7.     }
  8.     private function getControllerError($callable): string
  9.     {
  10.         if (\is_string($callable)) {
  1.         if ($this->container->has($class)) {
  2.             return $this->container->get($class);
  3.         }
  4.         try {
  5.             return parent::instantiateController($class);
  6.         } catch (\Error $e) {
  7.         }
  8.         $this->throwExceptionIfControllerWasRemoved($class$e);
  1.     /**
  2.      * {@inheritdoc}
  3.      */
  4.     protected function instantiateController(string $class): object
  5.     {
  6.         $controller parent::instantiateController($class);
  7.         if ($controller instanceof ContainerAwareInterface) {
  8.             $controller->setContainer($this->container);
  9.         }
  10.         if ($controller instanceof AbstractController) {
  1.         }
  2.         if (\is_array($controller)) {
  3.             if (isset($controller[0]) && \is_string($controller[0]) && isset($controller[1])) {
  4.                 try {
  5.                     $controller[0] = $this->instantiateController($controller[0]);
  6.                 } catch (\Error|\LogicException $e) {
  7.                     try {
  8.                         // We cannot just check is_callable but have to use reflection because a non-static method
  9.                         // can still be called statically in PHP but we don't want that. This is deprecated in PHP 7, so we
  10.                         // could simplify this with PHP 8.
  1.      */
  2.     public function getController(Request $request)
  3.     {
  4.         $e $this->stopwatch->start('controller.get_callable');
  5.         $ret $this->resolver->getController($request);
  6.         $e->stop();
  7.         return $ret;
  8.     }
  1.         if (null === $controllerFqcn || null === $controllerAction) {
  2.             return null;
  3.         }
  4.         $newRequest $request->duplicate(nullnull, ['_controller' => [$controllerFqcn$controllerAction]]);
  5.         $controllerCallable $this->controllerResolver->getController($newRequest);
  6.         if (false === $controllerCallable) {
  7.             throw new NotFoundHttpException(sprintf('Unable to find the controller "%s::%s".'$controllerFqcn$controllerAction));
  8.         }
  1.         return $this->getController(DashboardControllerInterface::class, $dashboardControllerFqcn'index'$request);
  2.     }
  3.     private function getCrudController(?string $crudControllerFqcn, ?string $crudActionRequest $request): ?CrudControllerInterface
  4.     {
  5.         return $this->getController(CrudControllerInterface::class, $crudControllerFqcn$crudAction$request);
  6.     }
  7.     private function getController(string $controllerInterface, ?string $controllerFqcn, ?string $controllerActionRequest $request)
  8.     {
  9.         if (null === $controllerFqcn || null === $controllerAction) {
  1.     {
  2.         if (null === $crudControllerFqcn) {
  3.             return null;
  4.         }
  5.         return $this->getCrudController($crudControllerFqcn$crudAction$request);
  6.     }
  7.     private function getDashboardController(?string $dashboardControllerFqcnRequest $request): ?DashboardControllerInterface
  8.     {
  9.         return $this->getController(DashboardControllerInterface::class, $dashboardControllerFqcn'index'$request);
  1.             $crudControllerFqcn $request->query->get(EA::CRUD_CONTROLLER_FQCN);
  2.         }
  3.         $crudAction $request->query->get(EA::CRUD_ACTION);
  4.         return $this->controllerFactory->getCrudControllerInstance($crudControllerFqcn$crudAction$request);
  5.     }
  6.     private function getSymfonyControllerFqcn(Request $request): ?string
  7.     {
  8.         $routeName $request->query->get(EA::ROUTE_NAME);
  1.         }
  2.         // creating the context is expensive, so it's created once and stored in the request
  3.         // if the current request already has an AdminContext object, do nothing
  4.         if (null === $adminContext $request->attributes->get(EA::CONTEXT_REQUEST_ATTRIBUTE)) {
  5.             $crudControllerInstance $this->getCrudControllerInstance($request);
  6.             $adminContext $this->adminContextFactory->create($request$dashboardControllerInstance$crudControllerInstance);
  7.         }
  8.         $request->attributes->set(EA::CONTEXT_REQUEST_ATTRIBUTE$adminContext);
  1.         $this->called true;
  2.         $this->priority $dispatcher->getListenerPriority($eventName$this->listener);
  3.         $e $this->stopwatch->start($this->name'event_listener');
  4.         ($this->optimizedListener ?? $this->listener)($event$eventName$dispatcher);
  5.         if ($e->isStarted()) {
  6.             $e->stop();
  7.         }
  1.         foreach ($listeners as $listener) {
  2.             if ($stoppable && $event->isPropagationStopped()) {
  3.                 break;
  4.             }
  5.             $listener($event$eventName$this);
  6.         }
  7.     }
  8.     /**
  9.      * Sorts the internal list of listeners for the given event by priority.
  1.         } else {
  2.             $listeners $this->getListeners($eventName);
  3.         }
  4.         if ($listeners) {
  5.             $this->callListeners($listeners$eventName$event);
  6.         }
  7.         return $event;
  8.     }
  1.         try {
  2.             $this->beforeDispatch($eventName$event);
  3.             try {
  4.                 $e $this->stopwatch->start($eventName'section');
  5.                 try {
  6.                     $this->dispatcher->dispatch($event$eventName);
  7.                 } finally {
  8.                     if ($e->isStarted()) {
  9.                         $e->stop();
  10.                     }
  11.                 }
  1.      */
  2.     private function handleRaw(Request $requestint $type self::MAIN_REQUEST): Response
  3.     {
  4.         // request
  5.         $event = new RequestEvent($this$request$type);
  6.         $this->dispatcher->dispatch($eventKernelEvents::REQUEST);
  7.         if ($event->hasResponse()) {
  8.             return $this->filterResponse($event->getResponse(), $request$type);
  9.         }
  1.     {
  2.         $request->headers->set('X-Php-Ob-Level', (string) ob_get_level());
  3.         $this->requestStack->push($request);
  4.         try {
  5.             return $this->handleRaw($request$type);
  6.         } catch (\Exception $e) {
  7.             if ($e instanceof RequestExceptionInterface) {
  8.                 $e = new BadRequestHttpException($e->getMessage(), $e);
  9.             }
  10.             if (false === $catch) {
  1.         $this->boot();
  2.         ++$this->requestStackSize;
  3.         $this->resetServices true;
  4.         try {
  5.             return $this->getHttpKernel()->handle($request$type$catch);
  6.         } finally {
  7.             --$this->requestStackSize;
  8.         }
  9.     }
  1.         if (!IpUtils::checkIp('127.0.0.1'$trustedProxies)) {
  2.             Request::setTrustedProxies(array_merge($trustedProxies, ['127.0.0.1']), Request::getTrustedHeaderSet());
  3.         }
  4.         try {
  5.             return $kernel->handle($request$type$catch);
  6.         } finally {
  7.             // restore global state
  8.             Request::setTrustedProxies($trustedProxies$trustedHeaderSet);
  9.         }
  10.     }
  1.         if ($this->surrogate) {
  2.             $this->surrogate->addSurrogateCapability($request);
  3.         }
  4.         // always a "master" request (as the real master request can be in cache)
  5.         $response SubRequestHandler::handle($this->kernel$requestHttpKernelInterface::MAIN_REQUEST$catch);
  6.         /*
  7.          * Support stale-if-error given on Responses or as a config option.
  8.          * RFC 7234 summarizes in Section 4.2.4 (but also mentions with the individual
  9.          * Cache-Control directives) that
  1.     protected function forward(Request $requestbool $catch falseResponse $entry null)
  2.     {
  3.         $this->getKernel()->boot();
  4.         $this->getKernel()->getContainer()->set('cache'$this);
  5.         return parent::forward($request$catch$entry);
  6.     }
  7.     /**
  8.      * Returns an array of options to customize the Cache configuration.
  9.      *
  1.         // avoid that the backend sends no content
  2.         $subRequest->headers->remove('If-Modified-Since');
  3.         $subRequest->headers->remove('If-None-Match');
  4.         $response $this->forward($subRequest$catch);
  5.         if ($response->isCacheable()) {
  6.             $this->store($request$response);
  7.         }
  1.         }
  2.         if (null === $entry) {
  3.             $this->record($request'miss');
  4.             return $this->fetch($request$catch);
  5.         }
  6.         if (!$this->isFreshEnough($request$entry)) {
  7.             $this->record($request'stale');
  1.                 reload the cache by fetching a fresh response and caching it (if possible).
  2.             */
  3.             $this->record($request'reload');
  4.             $response $this->fetch($request$catch);
  5.         } else {
  6.             $response $this->lookup($request$catch);
  7.         }
  8.         $this->restoreResponseBody($request$response);
  9.         if (HttpKernelInterface::MAIN_REQUEST === $type) {
  1.     {
  2.         if (!$this->booted) {
  3.             $container $this->container ?? $this->preBoot();
  4.             if ($container->has('http_cache')) {
  5.                 return $container->get('http_cache')->handle($request$type$catch);
  6.             }
  7.         }
  8.         $this->boot();
  9.         ++$this->requestStackSize;
  1.         $this->request $request;
  2.     }
  3.     public function run(): int
  4.     {
  5.         $response $this->kernel->handle($this->request);
  6.         $response->send();
  7.         if ($this->kernel instanceof TerminableInterface) {
  8.             $this->kernel->terminate($this->request$response);
  9.         }
in vendor/autoload_runtime.php -> run (line 35)
  1. $app $app(...$args);
  2. exit(
  3.     $runtime
  4.         ->getRunner($app)
  5.         ->run()
  6. );
require_once('/home/jumo/sites/sym/tracol/vendor/autoload_runtime.php') in public/index.php (line 5)
  1. <?php
  2. use App\Kernel;
  3. require_once dirname(__DIR__).'/vendor/autoload_runtime.php';
  4. return function (array $context) {
  5.     return new Kernel($context['APP_ENV'], (bool) $context['APP_DEBUG']);
  6. };