我最近try 从Laravel4.0升级到Laravel4.1,在运行php composer时出现以下错误.phar更新:
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]
我只要求:
"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:
在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"
]
},