Skip to content

Instantly share code, notes, and snippets.

@doxt3r
Created December 27, 2021 22:04
Show Gist options
  • Save doxt3r/aafabd3de5e653abc5b075e426462773 to your computer and use it in GitHub Desktop.
Save doxt3r/aafabd3de5e653abc5b075e426462773 to your computer and use it in GitHub Desktop.
Uncaught ReflectionException: Class "Doctrine\Common\Persistence\ObjectManager" not found while loading dans un symfony project 5

Après un composer update:

Executing script cache:clear [KO]
 [KO]
Script cache:clear returned with error code 255
!!  PHP Warning:  Uncaught ReflectionException: Class "Doctrine\Common\Persistence\ObjectManager" not found while loading "App\DataFixtures\AppFixtures". in /home/habeeb/lab/project/vendor/symfony/config/Resource/ClassExistenceResource.php:181

Il faut changer "use Doctrine\Common\Persistence\ManagerRegistry" par use Doctrine\Persistence\ManagerRegistry;

code:
- use Doctrine\Common\Persistence\ObjectManager;
+ use Doctrine\Persistence\ObjectManager;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment