问题
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
回答1:
I manage to solve my issue performing 3 successive actions :
delete "vendor" folder (I saved it in another folder just in case)
delete "cach-dev" folder
run "composer update" command
Hope it can help other people to solve their issue
来源:https://stackoverflow.com/questions/62328310/uncaught-error-class-app-kernel-not-found