Exceptions
Exceptions 2
InvalidArgumentException
if ($alternative = $this->findAlternative($bundleName)) {$message .= sprintf(' Did you mean "%s:%s:%s"?', $alternative, $controller, $action);}throw new \InvalidArgumentException($message, 0, $e);}$try = $bundle->getNamespace().'\\Controller\\'.$controller.'Controller';if (class_exists($try)) {return $try.'::'.$action.'Action';
in
vendor/symfony/framework-bundle/EventListener/ResolveControllerNameSubscriber.php->parse (line 40)
public function onKernelRequest(GetResponseEvent $event){$controller = $event->getRequest()->attributes->get('_controller');if (\is_string($controller) && false === strpos($controller, '::') && 2 === substr_count($controller, ':')) {// controller in the a:b:c notation then$event->getRequest()->attributes->set('_controller', $parsedNotation = $this->parser->parse($controller, false));@trigger_error(sprintf('Referencing controllers with %s is deprecated since Symfony 4.1, use "%s" instead.', $controller, $parsedNotation), E_USER_DEPRECATED);}}
* @param object $event The event object to pass to the event handlers/listeners*/protected function callListeners(iterable $listeners, string $eventName, $event){if ($event instanceof Event) {$this->doDispatch($listeners, $eventName, $event);return;}$stoppable = $event instanceof ContractsEvent || $event instanceof StoppableEventInterface;
public function handle(Request $request, $type = HttpKernelInterface::MASTER_REQUEST, $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) {
InvalidArgumentException
{if (!isset($this->bundles[$name])) {$class = \get_class($this);$class = 'c' === $class[0] && 0 === strpos($class, "class@anonymous\0") ? get_parent_class($class).'@anonymous' : $class;throw new \InvalidArgumentException(sprintf('Bundle "%s" does not exist or it is not enabled. Maybe you forgot to add it in the registerBundles() method of your %s.php file?', $name, $class));}return $this->bundles[$name];}
list($bundleName, $controller, $action) = $parts;$controller = str_replace('/', '\\', $controller);try {// this throws an exception if there is no such bundle$bundle = $this->kernel->getBundle($bundleName);} catch (\InvalidArgumentException $e) {$message = sprintf('The "%s" (from the _controller value "%s") does not exist or is not enabled in your kernel!',$bundleName,$originalController
in
vendor/symfony/framework-bundle/EventListener/ResolveControllerNameSubscriber.php->parse (line 40)
public function onKernelRequest(GetResponseEvent $event){$controller = $event->getRequest()->attributes->get('_controller');if (\is_string($controller) && false === strpos($controller, '::') && 2 === substr_count($controller, ':')) {// controller in the a:b:c notation then$event->getRequest()->attributes->set('_controller', $parsedNotation = $this->parser->parse($controller, false));@trigger_error(sprintf('Referencing controllers with %s is deprecated since Symfony 4.1, use "%s" instead.', $controller, $parsedNotation), E_USER_DEPRECATED);}}
* @param object $event The event object to pass to the event handlers/listeners*/protected function callListeners(iterable $listeners, string $eventName, $event){if ($event instanceof Event) {$this->doDispatch($listeners, $eventName, $event);return;}$stoppable = $event instanceof ContractsEvent || $event instanceof StoppableEventInterface;
public function handle(Request $request, $type = HttpKernelInterface::MASTER_REQUEST, $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) {
Stack Traces 2
[2/2] InvalidArgumentException |
|---|
InvalidArgumentException:
The "SAUserBundle" (from the _controller value "SAUserBundle:Security:login") does not exist or is not enabled in your kernel! Did you mean "FOSUserBundle:Security:login"?
at vendor/symfony/framework-bundle/Controller/ControllerNameParser.php:74
at Symfony\Bundle\FrameworkBundle\Controller\ControllerNameParser->parse()
(vendor/symfony/framework-bundle/EventListener/ResolveControllerNameSubscriber.php:40)
at Symfony\Bundle\FrameworkBundle\EventListener\ResolveControllerNameSubscriber->onKernelRequest()
(vendor/symfony/event-dispatcher/Debug/WrappedListener.php:126)
at Symfony\Component\EventDispatcher\Debug\WrappedListener->__invoke()
(vendor/symfony/event-dispatcher/EventDispatcher.php:260)
at Symfony\Component\EventDispatcher\EventDispatcher->doDispatch()
(vendor/symfony/event-dispatcher/EventDispatcher.php:235)
at Symfony\Component\EventDispatcher\EventDispatcher->callListeners()
(vendor/symfony/event-dispatcher/EventDispatcher.php:73)
at Symfony\Component\EventDispatcher\EventDispatcher->dispatch()
(vendor/symfony/event-dispatcher/Debug/TraceableEventDispatcher.php:168)
at Symfony\Component\EventDispatcher\Debug\TraceableEventDispatcher->dispatch()
(vendor/symfony/http-kernel/HttpKernel.php:127)
at Symfony\Component\HttpKernel\HttpKernel->handleRaw()
(vendor/symfony/http-kernel/HttpKernel.php:68)
at Symfony\Component\HttpKernel\HttpKernel->handle()
(vendor/symfony/http-kernel/Kernel.php:198)
at Symfony\Component\HttpKernel\Kernel->handle()
(public/index.php:25)
|
[1/2] InvalidArgumentException |
|---|
InvalidArgumentException:
Bundle "SAUserBundle" does not exist or it is not enabled. Maybe you forgot to add it in the registerBundles() method of your App\Kernel.php file?
at vendor/symfony/http-kernel/Kernel.php:231
at Symfony\Component\HttpKernel\Kernel->getBundle()
(vendor/symfony/framework-bundle/Controller/ControllerNameParser.php:62)
at Symfony\Bundle\FrameworkBundle\Controller\ControllerNameParser->parse()
(vendor/symfony/framework-bundle/EventListener/ResolveControllerNameSubscriber.php:40)
at Symfony\Bundle\FrameworkBundle\EventListener\ResolveControllerNameSubscriber->onKernelRequest()
(vendor/symfony/event-dispatcher/Debug/WrappedListener.php:126)
at Symfony\Component\EventDispatcher\Debug\WrappedListener->__invoke()
(vendor/symfony/event-dispatcher/EventDispatcher.php:260)
at Symfony\Component\EventDispatcher\EventDispatcher->doDispatch()
(vendor/symfony/event-dispatcher/EventDispatcher.php:235)
at Symfony\Component\EventDispatcher\EventDispatcher->callListeners()
(vendor/symfony/event-dispatcher/EventDispatcher.php:73)
at Symfony\Component\EventDispatcher\EventDispatcher->dispatch()
(vendor/symfony/event-dispatcher/Debug/TraceableEventDispatcher.php:168)
at Symfony\Component\EventDispatcher\Debug\TraceableEventDispatcher->dispatch()
(vendor/symfony/http-kernel/HttpKernel.php:127)
at Symfony\Component\HttpKernel\HttpKernel->handleRaw()
(vendor/symfony/http-kernel/HttpKernel.php:68)
at Symfony\Component\HttpKernel\HttpKernel->handle()
(vendor/symfony/http-kernel/Kernel.php:198)
at Symfony\Component\HttpKernel\Kernel->handle()
(public/index.php:25)
|