-
-
Notifications
You must be signed in to change notification settings - Fork 347
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
Make ConsecutiveNullCompareReturnsToNullCoalesceQueueRector use of StmtsAwareInterface #3783
Conversation
9f309db
to
33d8750
Compare
@@ -49,8 +49,6 @@ | |||
\Rector\NodeTypeResolver\Node\AttributeKey::SCOPE, | |||
\Rector\NodeTypeResolver\Node\AttributeKey::REPRINT_RAW_VALUE, | |||
\Rector\NodeTypeResolver\Node\AttributeKey::PARENT_NODE, | |||
\Rector\NodeTypeResolver\Node\AttributeKey::NEXT_NODE, | |||
\Rector\NodeTypeResolver\Node\AttributeKey::PREVIOUS_NODE, |
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.
@samsonasik Hi Abdul, I'm trying to remove all the next/previous node and replace with direct StmtsAwareInterface. That will help with improving memory load of the node tree as in PHPStan.
Could you help out? Take any rule and let's resolve them one by one :)
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.
Using StmtsAwareInterface
doesn't make memory lower, if we still need re-connect after refactor, see:
rector-src/src/Rector/AbstractRector.php
Line 441 in 11b278c
$this->nodeConnectingTraverser->traverse($nodes); |
If we need to test it out, we can remove the above call, and run tests:
vendor/bin/phpunit tests/Issues
and many errors will happen.
There is a condition which next/prev is needed, eg: on next of Expr
, eg:
$node = $concat->getAttribute(AttributeKey::NEXT_NODE); |
Reduce is possible, but removing is possibly huge BC break on end user.
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.
At the moment yes, we need traversing. The goal is to remove dependency on any connected nodes whatsoever.
It might take time, but it's worth it as we will release lot of memory connections.
f984aa9
to
358fee1
Compare
…mtsAwareInterface
78d8fb2
to
e2afc03
Compare
…e of StmtsAwareInterface (#3783)
…ctor use of StmtsAwareInterface (#3783)
No description provided.