-
Notifications
You must be signed in to change notification settings - Fork 134
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Define layers based on doc tags #1326
Define layers based on doc tags #1326
Conversation
Looks really good. I will give it a thorough review later today. One thing I noticed is your usage of |
This comment was marked as resolved.
This comment was marked as resolved.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR should make your other contributions much easier. I would suggest getting this one closed first.
|
This comment was marked as resolved.
This comment was marked as resolved.
Change in |
Yes, agreed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One tiny docs change and LGTM.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 🚀
@gennadigennadigennadi when you have a minute, can you merge this? |
I will response as soon as possible. Maybe during the weekend or the days after. I was reading without interfering all your conversations @brightbyte and @patrickkusebauch. And thank you both for the work you put into this PR. |
No rush, and happy holidays! |
tests/Core/Analyser/EventHandler/DependsOnInternalTokenTest.php
Outdated
Show resolved
Hide resolved
Just a thought I had, should we also support Attributes for this purpose in the future? |
Isn't that what AttributeCollector does? |
Yup, it is. Have not seen it. |
- renamed getParser to createParser - make TagValueRegexCollectorTest final - added test case names to data providers in DependsOnInternalTokenTest
256c1ce
to
10edae3
Compare
I'm confused by that CI error. Psalm is green when I run it locally. |
The psalm errors have been introduced with the last composer dependencies update. @brightbyte have install the updated dependencies from main? |
Ah, right. But also, it seems like I have messed up the rebase - I keep thinking on commits (gerrit flow) instead of branches (github flow). I'll look into it tomorrow. |
@gennadigennadigennadi Did I see correctly that this already went in as part of #1318, so this PR is redundant now? The fact that I don't make stacked PRs from a fork is really confusing me, it looks like #1318 ended up as two PRs mashed together... |
Looks like it did. |
Nevertheless, also merged this PR. @brightbyte thank you, again. |
This PR introduces a TagValueRegexCollector that allows layers to be defined based on the presence or value of doc tags like @deprecated.
All tags present in the doc block are exposed on ClassLikeReference and FunctionReference, for use by collectors and event handlers.
Note that this changs the way #1319 and #1318 should be implemented.