I must use \\Doctrine\\Common\\Annotations\\AnnotationRegistry::registerFile to access the annotation registry in entity files.
\\Doctrine\\Common\\Annotations\\AnnotationRegistry::registerFile
This part is required to use
Thank you Samuel Herzog. It works perfect for me. I was generating the Vendors using composer.json. So When I added my autoload.php i just needed to add these sentences...
Just like that.