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.

xdazz
  • 158,678
  • 38
  • 247
  • 274
Wisebes
  • 475
  • 4
  • 14
  • Hm, make sure that you're using the same version of `Doctrine` and `DBAL` both on local and remote server... – Jovan Perovic Mar 05 '14 at 16:15
  • 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? – Wisebes Mar 06 '14 at 07:07

1 Answers1

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]

Wisebes
  • 475
  • 4
  • 14