Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

symfony deployment error: mapped superclass

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.

like image 362
Wisebes Avatar asked Mar 05 '14 14:03

Wisebes


1 Answers

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]

like image 189
Wisebes Avatar answered Nov 15 '22 10:11

Wisebes