Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Script php artisan clear-compiled handling the pre-update-cmd event returned with an error (Laravel 4.1 upgrade)

I recently tried upgrading from Laravel 4.0 to Laravel 4.1, and I am getting the follow error when running php composer.phar update:

Script php artisan clear-compiled handling the pre-update-cmd event returned with an error



  [RuntimeException]  
  Error Output:       



update [--prefer-source] [--prefer-dist] [--dry-run] [--dev] [--no-dev] [--lock] [--no-plugins] [--no-custom-installers] [--no-scripts] [--no-progress] [--with-dependencies] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader] [packages1] ... [packagesN]

I am only requiring:

"require": {
        "laravel/framework": "4.1.*",
        "way/generators": "2.*",
        "madewithlove/laravel-oauth2": "0.4.*"
    },

Also, I received this before the error (even though I am running php 5.4.10 in my environment):

phpseclib/phpseclib suggests installing ext-gmp (Install the GMP (GNU Multiple Precision) extension in order to speed up arbitrary precision integer arithmetic operations.)
phpseclib/phpseclib suggests installing pear-pear/PHP_Compat (Install PHP_Compat to get phpseclib working on PHP < 4.3.3.)
d11wtq/boris suggests installing ext-readline (*)
d11wtq/boris suggests installing ext-pcntl (*)
Writing lock file
Generating autoload files

EDIT:

Scripts being used in composer.json:

"scripts": {
        "pre-install-cmd": [
            "php artisan clear-compiled"
        ],
        "post-install-cmd": [
            "php artisan optimize"
        ],
        "pre-update-cmd": [
            "php artisan clear-compiled"
        ],
        "post-update-cmd": [
            "php artisan optimize"
        ],
        "post-create-project-cmd": [
            "php artisan key:generate"
        ]
    },
like image 512
user1072337 Avatar asked Apr 04 '14 06:04

user1072337


3 Answers

Maybe you can try this command:

composer install --no-scripts
like image 187
Jonny Avatar answered Oct 23 '22 01:10

Jonny


Did you follow the upgrade procedure? Running composer update won't be enough. laravel.com/docs/upgrade

like image 43
user2094178 Avatar answered Oct 23 '22 00:10

user2094178


Try to remove /bootstrap/compiled.php (I was in trouble downgrading Laravel 4.2 > 4.1)

Then try to composer update, it should work.

Good luck

like image 6
jhmilan Avatar answered Oct 23 '22 01:10

jhmilan