-
Notifications
You must be signed in to change notification settings - Fork 59
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
Handle reflection error in retrieving default values #700
Conversation
src/DetectChanges/BCBreak/FunctionBased/ParameterDefaultValueChanged.php
Show resolved
Hide resolved
src/DetectChanges/BCBreak/FunctionBased/ParameterDefaultValueChanged.php
Outdated
Show resolved
Hide resolved
src/DetectChanges/BCBreak/FunctionBased/ParameterDefaultValueChanged.php
Show resolved
Hide resolved
test/unit/DetectChanges/BCBreak/FunctionBased/ParameterDefaultValueChangedTest.php
Show resolved
Hide resolved
9984489
to
cc5db34
Compare
Psalm seems for now not fixable since it complaining about undefined vars after the foreach but there is no possible case imho. PHPcs will be fixed in the next commit round and infection as soon as we are finished polishing the behaviour. |
src/DetectChanges/BCBreak/FunctionBased/ParameterDefaultValueChanged.php
Show resolved
Hide resolved
cc5db34
to
209091c
Compare
@Ocramius could you have a look again on this PR? Psalm errors were not fixable for me without defining the variables with |
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 from my Pov, thanks @DanielBadura!
Ah, one last thing: we'll need to rebase due to the |
…nd also using an enum as default value.
b475797
to
483cd59
Compare
@Ocramius PR is now rebased 👍 |
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.
Thanks @DanielBadura!
fix #698
This is the first PoC of handling the two errors mentioned in the linked issue. I added a TestCase for both errors. I'm not sure what exactly we should compare from the AST of the two parameters so for now only checking if the type is the same which already resolved the error case.