You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I uploaded my source code on the server. I installed the dependencies on the server. I ran composer dump-env prod. I ran composer require symfony/dotenv. I set APP_ENV=prod in the .env. Note I don't have .env.local but .env.local.php. I ran export APP_ENV=prod then export SYMFONY_ENV=prod. And finally composer install --no-dev --optimize-autoloader.
The output of composer is:
Loading composer repositories with package information
Installing dependencies from lock file
Package operations: 0 installs, 0 updates, 23 removals
Removing doctrine/cache (1.10.0)
Generating optimized autoload files
ocramius/package-versions: Package not found (probably scheduled for removal); generation of version class skipped.
Executing script cache:clear [KO]
[KO]
Script cache:clear returned with error code 255
!!
!! Fatal error: Uncaught Error: Class 'Doctrine\Bundle\DoctrineBundle\DoctrineBundle' not found in /home/trantkwr/public_html/src/Kernel.php:23
!! Stack trace:
!! #0 /home/trantkwr/public_html/vendor/symfony/http-kernel/Kernel.php(369): App\Kernel->registerBundles()
!! Untitled #1 /home/trantkwr/public_html/vendor/symfony/http-kernel/Kernel.php(123): Symfony\Component\HttpKernel\Kernel->initializeBundles()
!! Renaming "Entities" to "Entity" #2 /home/trantkwr/public_html/vendor/symfony/framework-bundle/Console/Application.php(169): Symfony\Component\HttpKernel\Kernel->boot()
!! Untitled #3 /home/trantkwr/public_html/vendor/symfony/framework-bundle/Console/Application.php(75): Symfony\Bundle\FrameworkBundle\Console\Application->registerCommands()
!! Same change for mapping files #4 /home/trantkwr/public_html/vendor/symfony/console/Application.php(140): Symfony\Bundle\FrameworkBundle\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
!! Using ORM and MongoDB both in the same bundle. #5 /home/trantkwr/public_html/bin/console(42): Symfony\Component\Console\Application->run(Object(Symfony\Compo in /home/trantkwr/public_html/src/Kernel.php on line 23
!!
Script @auto-scripts was called via post-install-cmd
Symfony version(s) affected: 5.0
Description
I am following this guide: https://symfony.com/doc/current/deployment.html#common-post-deployment-tasks.
I'm on a linux system. Centos 7.
I uploaded my source code on the server. I installed the dependencies on the server. I ran
composer dump-env prod. I rancomposer require symfony/dotenv. I setAPP_ENV=prodin the.env. Note I don't have.env.localbut.env.local.php. I ranexport APP_ENV=prodthenexport SYMFONY_ENV=prod. And finallycomposer install --no-dev --optimize-autoloader.The output of composer is:
Loading composer repositories with package information
Installing dependencies from lock file
Package operations: 0 installs, 0 updates, 23 removals
Generating optimized autoload files
ocramius/package-versions: Package not found (probably scheduled for removal); generation of version class skipped.
Executing script cache:clear [KO]
[KO]
Script cache:clear returned with error code 255
!!
!! Fatal error: Uncaught Error: Class 'Doctrine\Bundle\DoctrineBundle\DoctrineBundle' not found in /home/trantkwr/public_html/src/Kernel.php:23
!! Stack trace:
!! #0 /home/trantkwr/public_html/vendor/symfony/http-kernel/Kernel.php(369): App\Kernel->registerBundles()
!! Untitled #1 /home/trantkwr/public_html/vendor/symfony/http-kernel/Kernel.php(123): Symfony\Component\HttpKernel\Kernel->initializeBundles()
!! Renaming "Entities" to "Entity" #2 /home/trantkwr/public_html/vendor/symfony/framework-bundle/Console/Application.php(169): Symfony\Component\HttpKernel\Kernel->boot()
!! Untitled #3 /home/trantkwr/public_html/vendor/symfony/framework-bundle/Console/Application.php(75): Symfony\Bundle\FrameworkBundle\Console\Application->registerCommands()
!! Same change for mapping files #4 /home/trantkwr/public_html/vendor/symfony/console/Application.php(140): Symfony\Bundle\FrameworkBundle\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
!! Using ORM and MongoDB both in the same bundle. #5 /home/trantkwr/public_html/bin/console(42): Symfony\Component\Console\Application->run(Object(Symfony\Compo in /home/trantkwr/public_html/src/Kernel.php on line 23
!!
Script @auto-scripts was called via post-install-cmd