Message: [Syntax Error] Expected PlainValue, got ”’ at position x in property {model}

Was getting the above error in my Doctrine project, turned out I had used a single quote in the ORM Annotations:

    /**
     * @ORM\Column(type='integer', name='row_number')
     * @var int
     */
    protected $rowNumber;

Your ORM Annotations must be double quotes ” to allow the read ahead to read ahead…

Should be like:

    /**
     * @ORM\Column(type="integer", name="row_number")
     * @var int
     */
    protected $rowNumber;

14 comments on “Message: [Syntax Error] Expected PlainValue, got ”’ at position x in property {model}

  1. Eddie April 6, 2012 3:55 pm

    Great tip! Saved me loads of time. I dont think I would have thought about changing the quotes.

  2. admin April 17, 2012 2:05 pm

    Yes, it was very annoying. Glad it helped you.

  3. Daniel July 22, 2015 7:05 am

    Oh my god, you are my hero, even 3 years later…

    • admin July 22, 2015 7:21 am

      Hah! Glad it was of help to you

  4. Richmond February 18, 2016 6:03 am

    Thank you!
    the error was not that very helpful cause I had to find this first.

    Anyway.. thanks! 🙂

  5. Luiz Neri March 20, 2017 2:34 pm

    We’re in 2017 and your post still saving pple, thank you it just saved me.

  6. Dima October 13, 2017 11:43 am

    Thanks !! Your advice saved me much time!

  7. fudu October 18, 2018 2:31 pm

    Greate tips, save me alot of time, thanks 🙂

  8. PoorRichard February 14, 2019 4:36 pm

    Never take this down, still saving people!

  9. Achref FAIDI May 3, 2019 8:51 pm

    Thanks Man , you saved my Day !

  10. Gustavo May 23, 2019 8:21 am

    This is the magic of the internet. Almost 10 years later and still helping people. The author could even already be dead, but his legacy lives on.

    • admin May 23, 2019 10:24 am

      Well, thank you kindly sir. However, I am certainly not dead, thankfully still here.

      • MP/ June 4, 2019 1:15 pm

        Thanks to you 🙂

Leave a Reply to admin Cancel Reply

Your email address will not be published.

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

This site uses Akismet to reduce spam. Learn how your comment data is processed.