Skip to content

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

Description

@malandles

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.

Activity

  1. gustawdaniel commented on Apr 8, 2019

    @gustawdaniel

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

  2. gustawdaniel commented on Apr 8, 2019

    @gustawdaniel

    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions