LenaHic
LenaHic

Reputation: 121

Uncaught Error: Class 'App\Kernel' not found

I'm currently facing an important issue when i want to run any "php bin/console" command:

Symfony\Component\ErrorHandler\Error\ClassNotFoundError^ {#29
#message: """
    Attempted to load class "Kernel" from namespace "App".\n
    Did you forget a "use" statement for "Symfony\Component\HttpKernel\Kernel"?
    """
  #code: 0
  #file: "./bin/console"
  #line: 41
}
2020-06-11T15:43:20+00:00 [critical] Uncaught Error: Class 'App\Kernel' not found

While my Kernel.php class is normally defined in src/Kernel.php

I am working with Symfony 5

Upvotes: 5

Views: 8311

Answers (1)

LenaHic
LenaHic

Reputation: 121

I manage to solve my issue performing 3 successive actions :

  1. delete "vendor" folder (I saved it in another folder just in case)

  2. delete "cach-dev" folder

  3. run "composer update" command

Hope it can help other people to solve their issue

Upvotes: 6

Related Questions