When I deploy a symfony website including mapped superclass entities online, I get the following error:
AnnotationException: [Semantical Error] The annotation "@Doctrine\ORM\Mapping\MappedSuperClass" in class Acme\DemoBundle\Entity\Foo does not exist, or could not be auto-loaded.
Worst is, this error doesn't show if we use web/app.php (with debugging mode true), whereas it blocks the programm if you use web/app_dev.php.
I should add that, locally, this error does not show up while using either web/app.php or web/app_dev.php.
Does anyone have a clue about this dark mystery?
Thanks in advance for any hints.
Ok,
I will be answering to my own question, for the sake of future deployment processed by any fellow programmer.
the problem was in the doctrine annotation.
I put: @MappedSuperClass
whereas it is: @MappedSuperclass
REMEMBER: on mac, it doesn't make a difference. But also on linux if in prod mode (with debug option at true). that is why it was working with web/app.php.
However, in dev mode (web/app_dev.php), it doesn't work on a linux environment, which makes a difference between capitalized and normal letters.
I hope it will save you the headaches it caused me ;)
Regards,
Wisebes
[issue solved]
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With