wallabag / docker

Official docker-composer for wallabag.
572 stars 150 forks source link

Can't define admin user - "Symfony\Bundle\DebugBundle\DebugBundle" not found #382

Closed ajkessel closed 9 months ago

ajkessel commented 9 months ago

As I understand it, you are supposed to define an admin with a command like: bin/console fos:user:promote username -- env=prod When I do this, I get

Symfony\Component\ErrorHandler\Error\ClassNotFoundError^ {#61
  #message: """
    Attempted to load class "DebugBundle" from namespace "Symfony\Bundle\DebugBundle".\n
    Did you forget a "use" statement for another namespace?
    """
  #code: 0
  #file: "./app/AppKernel.php"
  #line: 48
  trace: {
    ./app/AppKernel.php:48 {
      AppKernel->registerBundles()^
      ⺠if (in_array($this->getEnvironment(), ['dev', 'test'], true)) {
      ⺠    $bundles[] = new Symfony\Bundle\DebugBundle\DebugBundle();
      ⺠    $bundles[] = new Symfony\Bundle\WebProfilerBundle\WebProfilerBundle();
    }
    ./vendor/symfony/http-kernel/Kernel.php:446 { â¦}
    ./vendor/symfony/http-kernel/Kernel.php:133 { â¦}
    ./vendor/symfony/framework-bundle/Console/Application.php:169 { â¦}
    ./vendor/symfony/framework-bundle/Console/Application.php:75 { â¦}
    ./vendor/symfony/console/Application.php:149 { â¦}
    ./bin/console:27 { â¦}
  }
}
2023-09-26T01:24:43+00:00 [critical] Uncaught Error: Class "Symfony\Bundle\DebugBundle\DebugBundle" not found

Is this the right way to create an admin user? If so, what do I need to do to include DebugBundle in the Docker image?

j0k3r commented 9 months ago

There is no space between -- and env=prod

bin/console fos:user:promote username --env=prod
ajkessel commented 9 months ago

Thanks! The line break before env=prod in the official documentation confused me.

ajkessel commented 9 months ago

Closing since this was my error!