Skip to content

Conversation

@mrtnzlml
Copy link
Contributor

@mrtnzlml mrtnzlml commented Aug 1, 2016

I know it's internal class, but I am using it anyway - so it's maybe my problem. And I know about this issue quite long, but with this commit I have to fix it. In current master you can have @privatex annotation and this test will pass:

Assert::same([TRUE], Reflection::parseAnnotation($rc, 'private'));

But I don't think this is right. Previously I was calling it like this:

$visible = ComponentReflection::parseAnnotation($actionReflection, 'public\\s');

But it's not possible now... :)

@dg
Copy link
Member

dg commented Aug 1, 2016

Good point. \w is not enough, char - must not follow too. Probably better will be white-list, i.e. '(?:\(\s*([^)]*)\s*\)|\s|$)#'

@mrtnzlml
Copy link
Contributor Author

mrtnzlml commented Aug 1, 2016

Yes, I need to practice regular expressions more - thanks. Updated... :)

@dg
Copy link
Member

dg commented Aug 1, 2016

Great, thx!

@dg dg merged commit d1b379c into nette:master Aug 1, 2016
@mrtnzlml mrtnzlml deleted the parseAnnotation branch August 1, 2016 12:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants