Error executing "composer update" in post-update-cmd

0

When launching a composer Update within a project, it shows me the following error:

  

Generating autoload files
  Illuminate \ Foundation \ ComposerScripts :: postUpdate
  php artisan optimize
  Php artisan script optimize handling the post-update-cmd event returned with error code 255

The project is this: link

In the file composer.json I have these scripts :

"scripts": {
        "post-root-package-install": [
            "php -r \"file_exists('.env') || copy('.env.example', '.env');\""
        ],
        "post-create-project-cmd": [
            "php artisan key:generate"
        ],
        "post-install-cmd": [
            "Illuminate\Foundation\ComposerScripts::postInstall",
            "php artisan optimize"
        ],
        "post-update-cmd": [
            "Illuminate\Foundation\ComposerScripts::postUpdate",
            "php artisan optimize"
        ]
    },

The version of Composer is 1.4.1

How can I solve it?

    
asked by Marc Torres 26.04.2017 в 11:12
source

1 answer

1

The error has to do with the PHP version. If you had in that PHP 5.4 server for example (or several versions but by default 5.4) that would be the problem.

Check: php -v

That gives you the pattern of what version runs when running php artisan optimize

    
answered by 14.09.2017 в 18:01