Symfony2 post-update-cmd gives “An error occurred when generating the bootstrap file”

后端 未结 11 1111
一向
一向 2020-12-15 05:13

I am currently on Symfony2 2.3.7. When I run the composer update command. In the post-update-cmd a script is run to update symfony2. But it fails:

Script Sen         


        
11条回答
  •  星月不相逢
    2020-12-15 05:30

    I ran into the same problem trying to use Symfony 3 on a Bluehost, shared hosting, server. I first had to find and use the php 5.4 client in order to get composer to run, then I got the same error you did. Check the docs here.

    PHP needs to be a minimum version of PHP 5.5.9

    So you are using a php client that composer supports, and Symfony does not. Bluehost provides the php client v5.6.24 accessible at /usr/php/56/bin/php.

    So, using that php executable:

    /usr/php/56/bin/php ~/my/path/to/composer.phar install
    

    I successfully ran "composer install" and all of the post-install-cmd's completed with no errors. This is also the way to call bin/console or in your case app/console commands. i.e.

    ## Symfony 2
    /usr/php/56/bin/php app/console cache:clear -e prod
    
    ## Symfony 3
    /usr/php/56/bin/php bin/console cache:clear -e prod
    

提交回复
热议问题