Skip to content

Symfony Demo deploying to Heroku with dev environment fails #398

@bocharsky-bw

Description

@bocharsky-bw

Steps to reproduce:

  • Click "Deploy to Heroku" button
  • Change SYMFONY_ENV required variable to dev instead of prod which is by default
  • Press deploy button

Logs

-----> PHP app detected
-----> Bootstrapping...
-----> Installing platform packages...
       - php (7.0.12)
       - ext-pdo_sqlite (bundled with php)
       - apache (2.4.20)
       - nginx (1.8.1)
-----> Installing dependencies...
       Composer version 1.2.1 2016-09-12 11:27:19
       Loading composer repositories with package information
       Installing dependencies from lock file
         - Installing doctrine/lexer (v1.0.1)
           Downloading: 100%
       
         - Installing doctrine/annotations (v1.2.7)
           Downloading: 100%
       
         - Installing twig/twig (v1.27.0)
           Downloading: 100%
       
         - Installing symfony/polyfill-util (v1.2.0)
           Downloading: 100%
       
         - Installing paragonie/random_compat (v2.0.2)
           Downloading: 100%
       
         - Installing symfony/polyfill-php70 (v1.2.0)
           Downloading: 100%
       
         - Installing symfony/polyfill-php56 (v1.2.0)
           Downloading: 100%
       
         - Installing symfony/polyfill-mbstring (v1.2.0)
           Downloading: 100%
       
         - Installing symfony/symfony (v3.2.0-BETA1)
           Downloading: 100%
       
         - Installing symfony/polyfill-intl-icu (v1.2.0)
           Downloading: 100%
       
         - Installing psr/log (1.0.1)
           Downloading: 100%
       
         - Installing psr/cache (1.0.1)
           Downloading: 100%
       
         - Installing doctrine/inflector (v1.1.0)
           Downloading: 100%
       
         - Installing doctrine/collections (v1.3.0)
           Downloading: 100%
       
         - Installing doctrine/cache (v1.6.0)
           Downloading: 100%
       
         - Installing doctrine/common (v2.6.1)
           Downloading: 100%
       
         - Installing doctrine/doctrine-cache-bundle (1.3.0)
           Downloading: 100%
       
         - Installing jdorn/sql-formatter (v1.2.17)
           Downloading: 100%
       
         - Installing doctrine/dbal (v2.5.5)
           Downloading: 100%
       
         - Installing doctrine/doctrine-bundle (1.6.4)
           Downloading: 100%
       
         - Installing doctrine/data-fixtures (v1.1.1)
           Downloading: 100%
       
         - Installing doctrine/doctrine-fixtures-bundle (2.3.0)
           Downloading: 100%
       
         - Installing doctrine/instantiator (1.0.5)
           Downloading: 100%
       
         - Installing doctrine/orm (v2.5.5)
           Downloading: 100%
       
         - Installing erusev/parsedown (1.6.0)
           Downloading: 100%
       
         - Installing ezyang/htmlpurifier (v4.8.0)
           Downloading: 100%
       
         - Installing incenteev/composer-parameter-handler (v2.1.2)
           Downloading: 100%
       
         - Installing sensiolabs/security-checker (v4.0.0)
           Downloading: 100%
       
         - Installing sensio/distribution-bundle (v5.0.13)
           Downloading: 100%
       
         - Installing sensio/framework-extra-bundle (v3.0.16)
           Downloading: 100%
       
         - Installing monolog/monolog (1.21.0)
           Downloading: 100%
       
         - Installing symfony/monolog-bundle (2.11.1)
           Downloading: 100%
       
         - Installing swiftmailer/swiftmailer (v5.4.3)
           Downloading: 100%
       
         - Installing symfony/swiftmailer-bundle (v2.3.11)
           Downloading: 100%
       
         - Installing twig/extensions (v1.4.0)
           Downloading: 100%
       
         - Installing pagerfanta/pagerfanta (v1.0.3)
           Downloading: 100%
       
         - Installing white-october/pagerfanta-bundle (v1.0.7)
           Downloading: 100%
       
       Generating optimized autoload files
       > Incenteev\ParameterHandler\ScriptHandler::buildParameters
       Creating the "app/config/parameters.yml" file
       > Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::buildBootstrap
       > Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::clearCache
       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 /tmp/build_0928389e81d9d8682b8f63075839b766/symfony-symfony-demo-0313e7a/app/AppKernel.php:36
       Stack trace:
       #0 /tmp/build_0928389e81d9d8682b8f63075839b766/symfony-symfony-demo-0313e7a/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Kernel.php(403): AppKernel->registerBundles()
       #1 /tmp/build_0928389e81d9d8682b8f63075839b766/symfony-symfony-demo-0313e7a/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Kernel.php(113): Symfony\Component\HttpKernel\Kernel->initializeBundles()
       #2 /tmp/build_0928389e81d9d8682b8f63075839b766/symfony-symfony-demo-0313e7a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Console/Application.php(68): Symfony\Component\HttpKernel\Kernel->boot()
       #3 /tmp/build_0928389e81d9d8682b8f63075839b766/symfony-symfony-demo-0313e7a/vendor/symfony/symfony/src/S in /tmp/build_0928389e81d9d8682b8f63075839b766/symfony-symfony-demo-0313e7a/app/AppKernel.php on line 36
       Script Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::clearCache handling the post-install-cmd event terminated with an exception
       
                                                                                                                                                                                                                            
         [RuntimeException]                                                                                                                                                                                                 
         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 /tmp/build_0928389e81d9d8682b8f63075839b766/symfony-symfony-demo-0313e7a/app/AppKernel.php:36                                                           
         Stack trace:                                                                                                                                                                                                       
         #0 /tmp/build_0928389e81d9d8682b8f63075839b766/symfony-symfony-demo-0313e7a/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Kernel.php(403): AppKernel->registerBundles()                                  
         #1 /tmp/build_0928389e81d9d8682b8f63075839b766/symfony-symfony-demo-0313e7a/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Kernel.php(113): Symfony\Component\HttpKernel\Kernel->initializeBundles()      
         #2 /tmp/build_0928389e81d9d8682b8f63075839b766/symfony-symfony-demo-0313e7a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Console/Application.php(68): Symfony\Component\HttpKernel\Kernel->boot()     
         #3 /tmp/build_0928389e81d9d8682b8f63075839b766/symfony-symfony-demo-0313e7a/vendor/symfony/symfony/src/S in /tmp/build_0928389e81d9d8682b8f63075839b766/symfony-symfony-demo-0313e7a/app/AppKernel.php on line 36  
         .                                                                                                                                                                                                                  
                                                                                                                                                                                                                            
       
       install [--prefer-source] [--prefer-dist] [--dry-run] [--dev] [--no-dev] [--no-custom-installers] [--no-autoloader] [--no-scripts] [--no-progress] [--no-suggest] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--ignore-platform-reqs] [--] [<packages>]...
       
 !     Push rejected, failed to compile PHP app.
 !     Push failed

Deploying with prod environment works fine though.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions