4

I'm setting a Laravel project into a server, but I had this problem when I used "composer install". I have done exactly the same in local, followed the same tutorials and I didn't have this problem.

I'm using ubuntu 16.04 for both.

Here is my composer.json file.

{
"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
}
}

And the error:

PHP Fatal error:  Class 'Doctrine\Common\Inflector\Inflector' not found in /vendor/laravel/framework/src/Illuminate/Support/Pluralizer.php on line 78


  [Symfony\Component\Debug\Exception\FatalErrorException]
  Class 'Doctrine\Common\Inflector\Inflector' not found

There is no problem in the laravel project, it seems to be any failure in the installation. Any idea of how to add the missing Class?.

Ray Montiel
  • 59
  • 1
  • 3

0 Answers0