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;

7 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!

Leave a 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>