Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Attempted to load class "DoctrineCacheBundle" from namespace "Doctrine\Bundle\DoctrineCacheBundle"

Can anyone help me, guys? Every time I run the command php bin/console server:run this error occurs:

PHP Fatal error: Uncaught Symfony\Component\Debug\Exception\ClassNotFoundException: Attempted to load class "DoctrineCacheBundle" from namespace "Doctrine\Bundle\DoctrineCacheBundle". Did you forget a "use" statement for another namespace? in C:\Users\XX-2\Desktop\React Projects\test_project\src\Kernel.php:23

like image 795
Sometimes-I-hate-debugging Avatar asked Dec 27 '19 08:12

Sometimes-I-hate-debugging


2 Answers

Possible this is because of update doctrine bundle. Remove this line Doctrine\Bundle\DoctrineCacheBundle\DoctrineCacheBundle::class => ['all' => true], from bundles.php, it works for me.

like image 65
Ihor Kostrov Avatar answered Nov 15 '22 05:11

Ihor Kostrov


I solved this issue installing the missing dependency:

composer require doctrine/doctrine-cache-bundle

like image 4
Genarito Avatar answered Nov 15 '22 04:11

Genarito