-
-
Notifications
You must be signed in to change notification settings - Fork 708
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
Add PHPStanAttributeTypeSyncer #2649
Conversation
@gnutix This rather meta-utility, to generate AttributeAware nodes from PHPStan nodes. That way we'd know about new PHPStan nodes much faster then reported in the issues. I'd like to know your feedback. |
That looks awesome! I was wondering how many more types I would discover and add in PRs like these. 😄 |
Well, I think that 0 :D should be automated by Github Actions Cron |
...ributeAwarePhpDoc/src/AttributeAwareNodeFactory/AttributeAwareGenericTagValueNodeFactory.php
Outdated
Show resolved
Hide resolved
packages/AttributeAwarePhpDoc/src/AttributeAwareNodeFactoryCollector.php
Show resolved
Hide resolved
utils/PHPStanAttributeTypeSyncer/src/ClassNaming/AttributeClassNaming.php
Outdated
Show resolved
Hide resolved
utils/PHPStanAttributeTypeSyncer/src/Command/SyncTypesCommand.php
Outdated
Show resolved
Hide resolved
utils/PHPStanAttributeTypeSyncer/src/NodeFactory/AttributeAwareClassFactory.php
Outdated
Show resolved
Hide resolved
Just went through the code quickly ; I didn't read the logic itself nor tested the feature, just added some general comments about code style. Is there more specific testing you'd like me to do as part of the review ? Would this PR fix #2614 too ? |
Thank you for review. #2614 is unrelated to this. This only creates Attribute aware mirror nodes for PhpDocParser nodes. Basically what PhpParser has for format preserving. The #2614 is about new node, that needs to be converted by static mapper. |
I will have very busy upcoming weeks, don't have much mental space to dig into these Rector/PhpStan/PhpParser layers of types (and frankly, its seriously missing documentation on these classes with complicated names - I can't understand the concepts behind it just looking at the code). But I could yet do another PR to fix #2614... That would be fast and easy. |
I think it takes time to understand AST and related mechanism. Don't rush on yourself. It took me 1-2 years to get from tokens into state, where the printed content looked as I needed.
👍 |
75fb645
to
2ad18be
Compare
2ad18be
to
c6443b5
Compare
0541389
to
16f1156
Compare
16f1156
to
5757122
Compare
6e02804
to
0afb435
Compare
rectorphp/rector-src@f5896ac [automated] Apply Coding Standard (#2649)
Closes #2647
Related Changes