9

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

3 Answers 3

33

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.

Sign up to request clarification or add additional context in comments.

1 Comment

You saved my life! Haha! It works fine for me perfectly. Appreciated.
6

I solved this issue installing the missing dependency:

composer require doctrine/doctrine-cache-bundle

2 Comments

Fix name compose to composer, pls
Ops, my bad! Done, thanks
2

Old question and already answered but in my case it was because of the repository files were created with an earlier symfony version.

Fixed by changing:

Symfony\Bridge\Doctrine\RegistryInterface

For:

Doctrine\Persistence\ManagerRegistry

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.