Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Composer install error when deploying (symfony export environment missing) #84

Open
malandles opened this issue Nov 29, 2018 · 2 comments

Comments

@malandles
Copy link

malandles commented Nov 29, 2018

Configuration

  • Symfony v3.4.18
  • EasyDeployBundle v1.0.5

Problem

When running the deploy command, while in the "Preparing app" phase, I get the following error:

The command "ssh -A staging '(export APP_ENV=prod; cd /var/www/html/releases/20181129155451 && /usr/local/bin/composer install --no-dev --prefer-dist --no-interaction --quiet)'" failed.  
                                                                                                                                                                                             
  Exit Code: 1(General error)

Which if I run the command on my remote server without the --quiet option gives this error:

An error occurred when executing the "'cache:clear --no-warmup'" command:                                                                                                                                
  PHP Fatal error:  Uncaught Symfony\Component\Debug\Exception\ClassNotFoundException: Attempted to load class "SensioGeneratorBundle" from namespace "Sensio\Bundle\GeneratorBundle".                     
  Did you forget a "use" statement for another namespace? in /var/www/html/app/AppKernel.php:43

Solution

This error does not happen if you specify the symfony environment before doing the composer install.

export SYMFONY_ENV=prod

I will try to do a pull-request as soon as I can.

@gustawdaniel
Copy link

But how to disable quiet flag? I have --quiet even if I run verbose mode ./bin/console deploy staging -v

@gustawdaniel
Copy link

I found:

https://github.com/EasyCorp/easy-deploy-bundle/blob/master/doc/default-deployer.md

->composerInstallFlags('--no-dev --prefer-dist --no-interaction') // default have also  --quiet

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants