Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Class not found error shown after every php artisan run after removing a package

Tags:

php

laravel-5

Today after removing spatie/laravel-glide package via composer , after any php artisan running show bellow error message :

  [Symfony\Component\Debug\Exception\FatalErrorException]
  Class 'Spatie\Glide\GlideServiceProvider' not found

I search about this problem and call bellow statment Many times:

composer dump-auto

But the error continues to be displayed.
this is my Composer file:

{
"name": "laravel/laravel",
"description": "The Laravel Framework.",
"keywords": ["framework", "laravel"],
"license": "MIT",
"type": "project",
"require": {
    "php": ">=5.5.9",
    "laravel/framework": "5.1.*",
    "mews/captcha": "^2.1"
},
"require-dev": {
    "fzaninotto/faker": "~1.4",
    "mockery/mockery": "0.9.*",
    "phpunit/phpunit": "~4.0",
    "phpspec/phpspec": "~2.1"
},
"autoload": {
    "classmap": [
        "database"
    ],
    "psr-4": {
        "App\\": "app/"
    }
},
"autoload-dev": {
    "classmap": [
        "tests/TestCase.php"
    ]
},
"scripts": {
    "post-install-cmd": [
        "php artisan clear-compiled",
        "php artisan optimize"
    ],
    "pre-update-cmd": [
        "php artisan clear-compiled"
    ],
    "post-update-cmd": [
        "php artisan optimize"
    ],
    "post-root-package-install": [
        "php -r \"copy('.env.example', '.env');\""
    ],
    "post-create-project-cmd": [
        "php artisan key:generate"
    ]
},
"config": {
    "preferred-install": "dist"
}

}

What to do?

like image 290
A.B.Developer Avatar asked Jan 08 '23 06:01

A.B.Developer


1 Answers

i found that in bootstrap\cache\config.php file and in providers and aliases array is a class entry for removed Class . i remove both and anythings works fine.

like image 91
A.B.Developer Avatar answered Jan 16 '23 22:01

A.B.Developer