DCOM-46: Make annotation index configurable #646

Closed
doctrinebot opened this Issue Apr 7, 2011 · 2 comments

2 participants

@doctrinebot

Jira issue originally created by user johannes:

So, this is another improvement that I'd like to make. Right now all annotations are indexed by their name which has the limitation that on the top level annotations with the same name are only gathered once.

/****
 * @param mixed $a
 * @param mixed $a
 * @param mixed $a
 */
function ($a, $b, $c) { }

In the above case the annotation parser would only pick up one "param" annotation. My guess is that this was done for fast lookups, but I think we need to make this configurable (I know you hate this word :)) as the workaround here is needlessly bloated.

/****
 * @params({@param, @param, @param})
 */
function($a, $b, $c) {}

This only requires two lines to be changed/made conditional, see
https://github.com/schmittjoh/SecurityExtraBundle/blob/master/Mapping/Driver/AnnotationParser.php#L63
https://github.com/schmittjoh/SecurityExtraBundle/blob/master/Mapping/Driver/AnnotationParser.php#L72

p.s. If you want me to provide a patch for this, just tell me.

@doctrinebot

Comment created by @guilhermeblanco:

Implemented on master.

59910f5

@doctrinebot

Issue was closed with resolution "Fixed"

@doctrinebot doctrinebot added this to the 2.1 milestone Dec 6, 2015
@doctrinebot doctrinebot closed this Dec 6, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment