Class' Doctrine \ Common \ Inflector \ Inflector'未找到

时间:2017-03-22 06:01:13

标签: php laravel doctrine composer-php

我将Laravel项目设置为服务器,但是当我使用" composer install"时出现了这个问题。我在本地完成了相同的操作,遵循相同的教程,我没有遇到这个问题。

我正在使用ubuntu 16.04。

这是我的int文件。

composer.json

错误:

{
"name": "laravel/laravel",
"description": "The Laravel Framework.",
"keywords": ["framework", "laravel"],
"license": "MIT",
"type": "project",
"require": {
    "php": ">=5.6.4",
    "doctrine/dbal": "^2.5",
    "laravel/framework": "5.4.*",
    "laravel/tinker": "~1.0"
},
"require-dev": {
    "fzaninotto/faker": "~1.4",
    "mockery/mockery": "0.9.*",
    "phpunit/phpunit": "~5.0"
},
"autoload": {
    "classmap": [
        "database"
    ],
    "psr-4": {
        "App\\": "app/"
    }
},
"autoload-dev": {
    "psr-4": {
        "Tests\\": "tests/"
    }
},
"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"
    ]
},
"config": {
    "preferred-install": "dist",
    "sort-packages": true
}
}

laravel项目没有问题,似乎安装失败了。知道如何添加缺少的类吗?

1 个答案:

答案 0 :(得分:0)

我通过以下操作解决了该问题:

删除供应商文件夹

rm -rf vendor

重新安装作曲家

composer install