I am getting this error in my annotations docblock for Doctrine 2:
Doctrine\Common\Annotations\AnnotationException: [Syntax Error] Expected PlainValue, got ')'
After looking for an answer I found this reference Stackoverflow Question 3500125 which in essence says to put quotes around all values in annotations.
With the annotation block I have this does not seem possible. here is my example that is throwing the error.
/**
* @var tags
*
* @ManyToMany(targetEntity="namespace\to\tag")
* @JoinTable(name="content_tag",
* joinColumns={
* @JoinColumn(name="content_id", referencedColumnName="id")
* },
* inverseJoinColumns={
* @JoinColumn(name="tag_id", referencedColumnName="id")
* }
* ) // This is the line indicated by the error
*/
private $tags;
If I follow the advice of the answer I found in stack overflow which is to quote out the values, my code will be like this:
/**
* @var tags
*
* @ManyToMany(targetEntity="namespace\to\tag")
* @JoinTable(name="content_tag",
* joinColumns="{
* @JoinColumn(name="content_id", referencedColumnName="id")
* }",
* inverseJoinColumns="{
* @JoinColumn(name="tag_id", referencedColumnName="id")
* }" // Note the extra quotation marks
* )
*/
private $tags;
Which is not right at all.