-
-
Notifications
You must be signed in to change notification settings - Fork 364
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
[DeadCode] Add RemoveJustPropertyFetchRector #2433
Conversation
d0612de
to
14eaec3
Compare
// ... | ||
$assign = $stmt->expr; | ||
|
||
if (! $assign->expr instanceof PropertyFetch) { |
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.
how about static property fetch ?
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.
In case of static property fetch, some reading/writing/cache is expected, so it would be risky to try to cover it.
This rule covers only readonly property fetch assign.
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.
Btw, seems like --debug
/-vvv
option does not work anymore. Only the last error message is printed, not the full stack trace. I tired to downgrade to Symfony 6 but it was not helpful :/
Could you check it? 🙂
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.
I will try. How to reproduce the not shown stack trace for your use case? throw Exception?
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.
Yea, I just throw a ShouldNotHappenException
to e.g. PhpDocInfoFactory::createFromNodeOrEmpty()
on first line.
3070454
to
bb5cf4b
Compare
bb5cf4b
to
5498164
Compare
eb7be57
to
84cc85a
Compare
84cc85a
to
fddd92e
Compare
fddd92e
to
ca8e4a7
Compare
No description provided.