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

Does not work with Nov 2018 changes to Symfony #88

Closed
kunno opened this issue Jan 30, 2019 · 3 comments
Closed

Does not work with Nov 2018 changes to Symfony #88

kunno opened this issue Jan 30, 2019 · 3 comments

Comments

@kunno
Copy link

kunno commented Jan 30, 2019

NOV 2018 Changes to Symfony
Gist: .env file logic has changed and the way .env is loaded has changed.
Looking for ways to have this bundle work with the change.

Using: Symfony v4.2.2 Composer 1.8.2

Easy Deploy Bundle error message:

 [Symfony\Component\Process\Exception\ProcessFailedException]                                                                     
 The command "ssh -A host'(export APP_ENV=prod; cd /var/www/project/current/releases/20190130085301 && /  
 usr/local/bin/composer install --prefer-dist --no-interaction --no-dev)'" failed.                                                
                                                                                                                                  
 Exit Code: 255(Unknown error)                                                                                                    
                                                                                                                                  
 Working directory: /home/project/test/project-api                                                                          
                                                                                                                                  
 Output:                                                                                                                          
 ================                                                                                                                 
 ocramius/package-versions:  Generating version class...                                                                          
 ocramius/package-versions: ...done generating version class                                                                      
                                                                                                                                  
                                                                                                                                  
 Error Output:                                                                                                                    
 ================                                                                                                                 
 Loading composer repositories with package information                                                                           
 Installing dependencies from lock file                                                                                           
 Package operations: 76 installs, 0 updates, 0 removals                                                                           
   - Installing ocramius/package-versions (1.3.0): Loading from cache                                                             
   - Installing symfony/flex (v1.1.8): Loading from cache                                                                         
   - Installing symfony/routing (v4.2.1): Loading from cache                                                                      
   - Installing symfony/polyfill-mbstring (v1.10.0): Loading from cache                                                           
   - Installing symfony/polyfill-ctype (v1.10.0): Loading from cache                                                              
   - Installing symfony/http-foundation (v4.2.1): Loading from cache                                                              
   - Installing symfony/contracts (v1.0.2): Loading from cache                                                                    
   - Installing symfony/event-dispatcher (v4.2.1): Loading from cache                                                             
   - Installing psr/log (1.1.0): Loading from cache                                                                               
   - Installing symfony/debug (v4.2.1): Loading from cache                                                                        
   - Installing symfony/http-kernel (v4.2.1): Loading from cache                                                                  
   - Installing symfony/finder (v4.2.1): Loading from cache                                                                       
   - Installing symfony/filesystem (v4.2.1): Loading from cache                                                                   
   - Installing psr/container (1.0.0): Loading from cache                                                                         
   - Installing symfony/dependency-injection (v4.2.1): Loading from cache                                                         
   - Installing symfony/config (v4.2.1): Loading from cache                                                                       
   - Installing symfony/var-exporter (v4.2.1): Loading from cache                                                                 
   - Installing psr/simple-cache (1.0.1): Loading from cache                                                                      
   - Installing psr/cache (1.0.1): Loading from cache                                                                             
   - Installing symfony/cache (v4.2.1): Loading from cache                                                                        
   - Installing symfony/framework-bundle (v4.2.1): Loading from cache                                                             
   - Installing ralouphie/getallheaders (2.0.5): Loading from cache                                                               
   - Installing psr/http-message (1.0.1): Loading from cache                                                                      
   - Installing guzzlehttp/psr7 (1.5.2): Loading from cache                                                                       
   - Installing guzzlehttp/promises (v1.3.1): Loading from cache                                                                  
   - Installing guzzlehttp/guzzle (6.3.3): Loading from cache                                                                     
   - Installing firebase/php-jwt (v5.0.0): Loading from cache                                                                     
   - Installing auth0/auth0-php (5.3.2): Loading from cache                                                                       
   - Installing auth0/jwt-auth-bundle (3.1.0): Loading from cache                                                                 
   - Installing doctrine/lexer (v1.0.1): Loading from cache                                                                       
   - Installing doctrine/annotations (v1.6.0): Loading from cache                                                                 
   - Installing doctrine/reflection (v1.0.0): Loading from cache                                                                  
   - Installing doctrine/event-manager (v1.0.0): Loading from cache                                                               
   - Installing doctrine/collections (v1.5.0): Loading from cache                                                                 
   - Installing doctrine/cache (v1.8.0): Loading from cache                                                                       
   - Installing doctrine/persistence (v1.1.0): Loading from cache                                                                 
   - Installing symfony/doctrine-bridge (v4.2.1): Loading from cache                                                              
   - Installing doctrine/inflector (v1.3.0): Loading from cache                                                                   
   - Installing doctrine/doctrine-cache-bundle (1.3.5): Loading from cache                                                        
   - Installing doctrine/instantiator (1.1.0): Loading from cache                                                                 
   - Installing symfony/console (v4.2.1): Loading from cache                                                                      
   - Installing zendframework/zend-eventmanager (3.2.1): Loading from cache                                                       
   - Installing zendframework/zend-code (3.3.1): Loading from cache                                                               
   - Installing ocramius/proxy-manager (2.2.2): Loading from cache                                                                
   - Installing doctrine/dbal (v2.9.2): Loading from cache                                                                        
   - Installing doctrine/migrations (v1.8.1): Loading from cache                                                                  
   - Installing jdorn/sql-formatter (v1.2.17): Loading from cache                                                                 
   - Installing zircote/swagger-php (2.0.13): Loading from cache                                                                  
   - Installing symfony/inflector (v4.2.1): Loading from cache                                                                    
   - Installing symfony/property-info (v4.2.1): Loading from cache                                                                
   - Installing symfony/options-resolver (v4.2.1): Loading from cache                                                             
   - Installing webmozart/assert (1.4.0): Loading from cache                                                                      
   - Installing phpdocumentor/reflection-common (1.0.1): Loading from cache                                                       
   - Installing phpdocumentor/type-resolver (0.4.0): Loading from cache                                                           
   - Installing phpdocumentor/reflection-docblock (4.3.0): Loading from cache                                                     
   - Installing exsyst/swagger (v0.4.1): Loading from cache                                                                       
   - Installing nelmio/api-doc-bundle (v3.3.0): Loading from cache                                                                
   - Installing nelmio/cors-bundle (1.5.4): Loading from cache                                                                    
   - Installing doctrine/common (v2.10.0): Loading from cache                                                                     
   - Installing sensio/framework-extra-bundle (v5.2.4): Loading from cache                                                        
   - Installing symfony/asset (v4.2.1): Loading from cache                                                                        
   - Installing doctrine/orm (v2.6.3): Loading from cache                                                                         
   - Installing doctrine/doctrine-bundle (1.10.0): Loading from cache                                                             
   - Installing doctrine/doctrine-migrations-bundle (v1.3.2): Loading from cache                                                  
   - Installing symfony/orm-pack (v1.0.5): Loading from cache                                                                     
   - Installing symfony/security-core (v4.2.1): Loading from cache                                                                
   - Installing symfony/property-access (v4.2.1): Loading from cache                                                              
   - Installing symfony/security-http (v4.2.1): Loading from cache                                                                
   - Installing symfony/security-guard (v4.2.1): Loading from cache                                                               
   - Installing symfony/security-csrf (v4.2.1): Loading from cache                                                                
   - Installing symfony/security-bundle (v4.2.1): Loading from cache                                                              
   - Installing symfony/serializer (v4.2.1): Loading from cache                                                                   
   - Installing twig/twig (v2.6.0): Loading from cache                                                                            
   - Installing symfony/twig-bridge (v4.2.1): Loading from cache                                                                  
   - Installing symfony/twig-bundle (v4.2.1): Loading from cache                                                                  
   - Installing symfony/yaml (v4.2.1): Loading from cache                                                                         
 Generating autoload files                                                                                                        
 Executing script cache:clear [KO]                                                                                                
  [KO]                                                                                                                            
 Script cache:clear returned with error code 255                                                                                  
 !!  PHP Fatal error:  Uncaught RuntimeException: Please run "composer require symfony/dotenv" to load the ".env" files configur  
 ing the application. in /var/www/project/current/releases/20190130085301/config/bootstrap.php:10                              
 !!  Stack trace:                                                                                                                 
 !!  #0 /var/www/project/current/releases/20190130085301/bin/console(26): require()                                            
 !!  #1 {main}                                                                                                                    
 !!    thrown in /var/www/project/current/releases/20190130085301/config/bootstrap.php on line 10                              
 !!                                                                                                                               
 Script @auto-scripts was called via post-install-cmd   
@kunno
Copy link
Author

kunno commented Jan 30, 2019

running composer require symfony/dotenv does not fix this.

@kunno
Copy link
Author

kunno commented Jan 30, 2019

Explicitly set require symfony/dotenv in composer.json require-dev section also added ->composerInstallFlags('--prefer-dist --no-interaction --dev') to config/dev/deploy.php
Below is a different error message than earlier. Showing only stack trace on this one. Same install messages preceding stack trace as previous error

  Executing script cache:clear [KO]                                                                                                
   [KO]                                                                                                                            
  Script cache:clear returned with error code 255                                                                                  
  !!  PHP Fatal error:  Uncaught Symfony\Component\Dotenv\Exception\PathException: Unable to read the "/var/www/project/current/releases/20190130095742/.env" environment file. in /var/www/project/current/releases/20190130095742/vendor/symfony/dotenv/Dotenv.php:466                                                                                                                   
  !!  Stack trace:                                                                                                                 
  !!  #0 /var/www/project/current/releases/20190130095742/vendor/symfony/dotenv/Dotenv.php(51): Symfony\Component\Dotenv\Doten  
  v->doLoad(false, Array)                                                                                                          
  !!  #1 /var/www/project/current/releases/20190130095742/vendor/symfony/dotenv/Dotenv.php(71): Symfony\Component\Dotenv\Doten  
  v->load('/var/www/proje...')                                                                                                    
  !!  #2 /var/www/project/current/releases/20190130095742/config/bootstrap.php(13): Symfony\Component\Dotenv\Dotenv->loadEnv('  
  /var/www/proje...')                                                                                                             
  !!  #3 /var/www/project/current/releases/20190130095742/bin/console(26): require('/var/www/proje...')                        
  !!  #4 {main}                                                                                                                    
  !!    thrown in /var/www/project/current/releases/20190130095742/vendor/symfony/dotenv/Dotenv.php on line 466                 
  !!                                                                                                                               
  Script @auto-scripts was called via post-install-cmd

@kunno
Copy link
Author

kunno commented Jan 30, 2019

I think the docs explaining this could use some work. Progressed to issue #87

@kunno kunno closed this as completed Jan 30, 2019
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

1 participant