Symfony Exception

ClassNotFoundError

HTTP 500 Internal Server Error

Attempted to load class "MakerBundle" from namespace "Symfony\Bundle\MakerBundle".
Did you forget a "use" statement for another namespace?

Exception

Symfony\Component\ErrorHandler\Error\ ClassNotFoundError

  1.     public function registerBundles(): iterable
  2.     {
  3.         $contents = require $this->getBundlesPath();
  4.         foreach ($contents as $class => $envs) {
  5.             if ($envs[$this->environment] ?? $envs['all'] ?? false) {
  6.                 yield new $class();
  7.             }
  8.         }
  9.     }
  10.     public function registerContainerConfiguration(LoaderInterface $loader): void
  1.      */
  2.     protected function initializeBundles(): void
  3.     {
  4.         // init bundles
  5.         $this->bundles = [];
  6.         foreach ($this->registerBundles() as $bundle) {
  7.             $name $bundle->getName();
  8.             if (isset($this->bundles[$name])) {
  9.                 throw new \LogicException(sprintf('Trying to register two bundles with the same name "%s".'$name));
  10.             }
  11.             $this->bundles[$name] = $bundle;
  1.             }
  2.             $_ENV['SHELL_VERBOSITY'] = 3;
  3.             $_SERVER['SHELL_VERBOSITY'] = 3;
  4.         }
  5.         $this->initializeBundles();
  6.         $this->initializeContainer();
  7.         $container $this->container;
  8.         if ($container->hasParameter('kernel.trusted_hosts') && $trustedHosts $container->getParameter('kernel.trusted_hosts')) {
  1.     }
  2.     public function handle(Request $requestint $type HttpKernelInterface::MAIN_REQUESTbool $catch true): Response
  3.     {
  4.         if (!$this->booted) {
  5.             $container $this->container ?? $this->preBoot();
  6.             if ($container->has('http_cache')) {
  7.                 return $container->get('http_cache')->handle($request$type$catch);
  8.             }
  9.         }
Kernel->handle() in /var/www/html/dashboard/public/index.php (line 25)
  1.     Request::setTrustedHosts([$trustedHosts]);
  2. }
  3. $kernel = new Kernel($_SERVER['APP_ENV'], (bool) $_SERVER['APP_DEBUG']);
  4. $request Request::createFromGlobals();
  5. $response $kernel->handle($request);
  6. $response->send();
  7. $kernel->terminate($request$response);

Stack Trace

ClassNotFoundError
Symfony\Component\ErrorHandler\Error\ClassNotFoundError:
Attempted to load class "MakerBundle" from namespace "Symfony\Bundle\MakerBundle".
Did you forget a "use" statement for another namespace?

  at /var/www/html/dashboard/vendor/symfony/framework-bundle/Kernel/MicroKernelTrait.php:136
  at App\Kernel->registerBundles()
     (/var/www/html/dashboard/vendor/symfony/http-kernel/Kernel.php:332)
  at Symfony\Component\HttpKernel\Kernel->initializeBundles()
     (/var/www/html/dashboard/vendor/symfony/http-kernel/Kernel.php:724)
  at Symfony\Component\HttpKernel\Kernel->preBoot()
     (/var/www/html/dashboard/vendor/symfony/http-kernel/Kernel.php:173)
  at Symfony\Component\HttpKernel\Kernel->handle()
     (/var/www/html/dashboard/public/index.php:25)