我正在尝试运行命令
composer update
收到此错误消息:
[运行时异常] 无法扫描"数据库"中的类,该类似乎没有 是文件也不是文件夹
这是我composer.json
中的代码:
{
"name": "laravel/laravel",
"description": "The Laravel Framework.",
"keywords": ["framework", "laravel"],
"license": "MIT",
"type": "project",
"require": {
"php": ">=5.5.9",
"laravel/framework": "5.2.*",
"jenssegers/mongodb": "^2.0",
"lucadegasperi/oauth2-server-laravel": "^5.1",
"laravelcollective/html": "5.2.*",
"davibennun/laravel-push-notification": "dev-laravel5"
},
"require-dev": {
"fzaninotto/faker": "~1.4",
"mockery/mockery": "0.9.*",
"phpunit/phpunit": "~4.0",
"symfony/css-selector": "2.8.*|3.0.*",
"symfony/dom-crawler": "2.8.*|3.0.*"
},
"autoload": {
"classmap": [
"database"
],
"psr-4": {
"App\": "app/"
}
},
"autoload-dev": {
"classmap": [
"tests/TestCase.php"
]
},
"scripts": {
"post-root-package-install": [
"php -r "copy('.env.example', '.env');""
],
"post-create-project-cmd": [
"php artisan key:generate"
],
"post-install-cmd": [
"php artisan clear-compiled",
"php artisan optimize"
],
"post-update-cmd": [
"php artisan clear-compiled",
"php artisan optimize"
]
},
"config": {
"preferred-install": "dist"
}
}
我们可以通过在项目根目录下创建database
文件夹来解决此问题:<PROJECT_ROOT>/database
。如果我们想确保所有东西都可以使用,我们可以删除composer.lock
文件并再次运行作曲家更新命令。