symfony deployment error: mapped superclass
Asked Answered
E

1

6

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.

Exacerbate answered 5/3, 2014 at 14:32 Comment(2)
Hm, make sure that you're using the same version of Doctrine and DBAL both on local and remote server...Cleromancy
Well, I am absolutely sure this is the same version, as I made sure to export them via ftp (instead of using composer). still the issue remains! Also, why would it impact web/app_dev.php and not web/app.php?Exacerbate
E
19

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]

Exacerbate answered 6/3, 2014 at 9:19 Comment(2)
You should accept your own answer. I had exactly this problem and your answer solved it perfectly.Chanticleer
Agreed. Please accept your own answer, it worked for me too.Wart

© 2022 - 2024 — McMap. All rights reserved.