Bug #25694

Multiple annotations with the same name are not supported by the reflection service

Added by Andreas Förthner over 10 years ago. Updated almost 10 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Reflection
Start date:
2011-04-01
Due date:
% Done:

0%

Estimated time:
PHP Version:
Has patch:
Complexity:

Description

As the returned $tags array is indexed by the annotation name, e.g. two @validate annotations will override eachother.

#1

Updated by Karsten Dambekalns over 10 years ago

Did you see my comment at https://review.typo3.org/#patch,sidebyside,1300,2,Classes/Object/Proxy/ProxyMethod.php for buildMethodDocumentation()?

Previously one tag per value would be generated, now one tag that combines the values.

#2

Updated by Andreas Förthner over 10 years ago

Yes, but the values array contains the values of one tag, e.g. @validate abc def ghi means that $values = array('abc', 'def', 'ghi');

Having multiple @validate annotations doesn't work in either case. To make this possible the ReflectionService API has to be changed...

#3

Updated by Christopher Hlubek over 10 years ago

I think the problem with the ProxyMethod was solved (generates multiple annotations again).

The methods for tags in the ReflectionService (e.g. getMethodTagsValues) return an array of tags with values as array. So multiple annotations are returned inside the value array. This is also tested in the ReflectionServiceTest with getMethodTagsValuesReturnsArrayOfTagsAndValuesOfAMethod.

Maybe it's the ValidatorResolver that cannot handle multiple tags?

#4

Updated by Sebastian Kurfuerst about 10 years ago

  • Target version changed from 1.0 beta 1 to 1.0 beta 2

we won't manage this for beta1 anymore, postproning

#5

Updated by Robert Lemke about 10 years ago

  • Status changed from New to Needs Feedback
  • Priority changed from Must have to Should have

As far as I understand it, the ReflectionService works correctly.

Without some steps to reproduce this problem, I'd like to close this issue.

#6

Updated by Robert Lemke about 10 years ago

  • Target version changed from 1.0 beta 2 to 1.0.0
#7

Updated by Robert Lemke almost 10 years ago

  • Status changed from Needs Feedback to Closed

Can't reproduce.

Also available in: Atom PDF