Doctrine Error: Expected Plain Value

This post is more than 18 months old. Since technology changes to rapidly, this content may be out of date (but that's not always the case). Please remember to verify any technical or programming information with the current release.

I’m so used to PHP’s liberal allowance for single and double quotes, that I forget that other languages and tool-sets don’t play that way. Case in point, my most recent error:

[Syntax Error] Expected PlainValue, got ''' at position 378 in class My\Bundle\App\Entity\ItemDefinition.

It was actually pretty difficult to search for ' - so hopefully this will help someone else who is looking. The solution?

Drum-roll please: It’s because in an annotation, single quotes were used instead of the required double quotes.

php

Return to All Posts