-
Notifications
You must be signed in to change notification settings - Fork 129
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
PhpParser 5 & PhpUnit 11 #1404
PhpParser 5 & PhpUnit 11 #1404
Conversation
d1e4709
to
358e6d3
Compare
Note: didn't read through the whole patch yet 😁 |
dc61def
to
8f94dee
Compare
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.
@kukulich I don't see any explicit BC breaks, or am I missing something?
if ($nodeDocComment !== null) { | ||
$functionCall->setDocComment($nodeDocComment); | ||
} |
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.
Suspicious of this change: why is the AutoloadSourceLocator
making decisions about changing the AST?
I'm not questioning the fact that this fixes something, but rather the fact that this call is specifically part of a source locator 🤔
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.
@kukulich this is the last concern in this patch: what's going on with us manipulating nodes during *Locator
activities?
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.
It looks I've copied too much yesterday. The "copy" hack is not neccessary in AutoloadSourceLocator
. Removed now.
Did a local test of performance improvements:
Time-wise, we're running the same stuff, but memory usage dropped sharply, probably due to PHP-Parser relying less on |
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.
Most excellent, thanks @kukulich!
This is going in a minor release :) People should pin their own |
There are some little BC breaks, see changes eg. in
ClassForSourceStubberExpected.php
Node\Expr\FuncCall
is now wrapped inNode\Stmt\Expression
and the comment is part of the wrapper. I've made a little hack and I copy the comment to theFuncCall
node. See eg.FindReflectionsInTree