kayue / KayueWordpressBundle

A Symfony 2 bundle for providing WordPress repositories and authenticating users (login).
101 stars 43 forks source link

Avoid fatal error when updating other entities. #77

Closed peterlozano closed 6 years ago

peterlozano commented 6 years ago

When trying to update some classes in my Symfony project using the command doctrine:generate:entities, I got this error:

[Symfony\Component\Debug\Exception\ContextErrorException] Catchable Fatal Error: Argument 1 passed to Doctrine\Common\Annotations\AnnotationReader::getClassAnnotations() must be an instance of ReflectionClass, null given, called in [...]/vendor/kayue/kayue-wordpress-bundle/Kayue/WordpressBundle/Subscriber/TablePrefixSubscriber.php on line 38 and defined

I've avoided this error with this code fix.

kayue commented 6 years ago

Thanks @peterlozano , I have tagged a new version.