1

We wrote an application with SF4. It works fine, even on the remote site, in dev mode.

So we try to get prod mode. In .env, we pass the APP_ENV variable to prod, an we have the message :

Fatal error: Uncaught Symfony\Component\DependencyInjection\Exception\InvalidArgumentException: There is no extension able to load the configuration for "debug" (in /home/olymphys/public_html/config/packages/debug.yml). Looked for namespace "debug", found "framework", "sensio_framework_extra", "doctrine_cache", "doctrine", "doctrine_migrations", "security", "swiftmailer", "twig", "monolog", "easy_admin", "vich_uploader", "webpack_encore" in /home/olymphys/public_html/vendor/symfony/dependency-injection/Loader/YamlFileLoader.php:682 Stack trace: #0 /home/olymphys/public_html/vendor/symfony/dependency-injection/Loader/YamlFileLoader.php(652): Symfony\Component\DependencyInjection\Loader\YamlFileLoader->validate(Array, '/home/olymphys/...') #1 /home/olymphys/public_html/vendor/symfony/dependency-injection/Loader/YamlFileLoader.php(119): Symfony\Component\DependencyInjection\Loader\YamlFileLoader->loadFile('/home/olymphys/...') #2 /home/olymphys/public_html/vendor/symfony/config/Loader/FileLoader.php(151): Symfony\Component\D in /home/olymphys/public_html/vendor/symfony/config/Loader/FileLoader.php on line 166

We tried to use dump_destination in symfony/debug-bundle config and nothing different happen...

yivi
  • 42,438
  • 18
  • 116
  • 138
D.Picard
  • 99
  • 2
  • 13

1 Answers1

3

Whatever you have on packages/debug.yml should not be there for production.

Move it to packages/dev/debug.yml so it's only loaded when APP_ENV is set to dev.

yivi
  • 42,438
  • 18
  • 116
  • 138