wallabag / docker

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

Can't run migration, DebugBundle not found #399

Closed GiovanH closed 6 months ago

GiovanH commented 7 months ago

Environment

What steps will reproduce the bug?

Executing the console command fails, as the DebugBundle is not packaged in the docker build.

/var/www/wallabag # /var/www/wallabag/bin/console
Symfony\Component\ErrorHandler\Error\ClassNotFoundError^ {#75
  #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 { …}
  }
}
2024-02-26T05:52:52+00:00 [critical] Uncaught Error: Class "Symfony\Bundle\DebugBundle\DebugBundle" not found
j0k3r commented 7 months ago

Have you tried /var/www/wallabag/bin/console --env=prod?

GiovanH commented 6 months ago

Running with --env=prod works.