Laravel 4.2 artisan CLI does not work anymore after composer update

梦想的初衷 提交于 2019-12-10 18:17:21

问题


I just ran "composer update" on my production server, and received this error:

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

When I try any "php artisan" commands, I do not receive any results.

I have tried deleting my composer.lock file and my vendor folder, and ran "composer install" again, but no results.

Here is my composer.json file:

{
"name": "laravel/laravel",
"description": "The Laravel Framework.",
"keywords": ["framework", "laravel"],
"license": "MIT",
"type": "project",
"require": {
"laravel/framework": "4.2.*",
"bllim/laravalid": "dev-laravel4",
"facebook/php-sdk-v4" : "~5.0" 

},
"autoload": {
"classmap": [
"app/commands",
"app/controllers",
"app/composers",
"app/models",
"app/database/migrations",
"app/database/seeds",
"app/tests/TestCase.php"
]
},
"scripts": {
"post-install-cmd": [
"php artisan clear-compiled",
"php artisan optimize"
],
"post-update-cmd": [
"php artisan clear-compiled",
"php artisan optimize"
],
"post-create-project-cmd": [
"php artisan key:generate"
]
},
"config": {
"preferred-install": "dist"
},
"minimum-stability": "stable"
}

My production server runs PHP 5.6 and Apache 2.4.


回答1:


I solved this problem by following steps:

  1. remove vendor folder and composer.lock
  2. change composer.jason to default
  3. run composer install
  4. run composer update
  5. in the bllim validation folder "converter" to "Converter"
  6. run composer update again


来源:https://stackoverflow.com/questions/32718911/laravel-4-2-artisan-cli-does-not-work-anymore-after-composer-update

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!