Ticket #202 (closed defect: fixed)

Opened 12 months ago

Last modified 2 weeks ago

Annotation is ignored if other doc comment lines contain parentheses including quotation marks

Reported by: rist Owned by: mikey
Priority: critical Milestone: 0.15.0
Component: ReflectionApi Version: SVN-trunk
Keywords: Cc:

Description (last modified by mikey) (diff)

When creating an annotation, the annotation won't be recognized if the doc comment includes additional parentheses in another line containing doc comments like @return and if within these parentheses a string is contained like in the example, which would evaluate to false ... :

$class = new stubReflectionClass('a::b::c::MyClass');
var_dump($class->getMethod('getDsn')->hasAnnotation('DBColumn'));

... given the following:

/**
 * Gets the Data Source Name (DSN).
 *
 * @DBColumn(name='dsn', type='VARCHAR', size=100)
 * @return  string  (e.g. 'mysql://user:password@host/dbName')
 */
public function getDsn() {}

Change History

Changed 12 months ago by mikey

  • status changed from new to assigned
  • description modified (diff)
  • component changed from Database Persistence to ReflectionApi
  • summary changed from DBColumn Annotation is ignored to Annotation is ignored
  • priority changed from major to critical
  • milestone set to 1.0.0

Changed 12 months ago by mikey

  • summary changed from Annotation is ignored to Annotation is ignored if other doc comment lines contain parentheses

Changed 12 months ago by mikey

  • description modified (diff)

Changed 12 months ago by mikey

  • summary changed from Annotation is ignored if other doc comment lines contain parentheses to Annotation is ignored if other doc comment lines contain parentheses including quotation marks

Changed 12 months ago by mikey

  • status changed from assigned to closed
  • resolution set to fixed

Fixed with r2140.

Note: See TracTickets for help on using tickets.