-
Notifications
You must be signed in to change notification settings - Fork 39
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
Does not report changes in parent constructor #106
Comments
Internally we rely a lot on using this tool alongside phpcs and phpstan, just curious if it was picked up by any other means? I am surprised the change to the constructor on the parent class didnt flag this as a change to Could you give a general example with a few more details? |
@convenient , I actually ran into it before it came into our automated testing process. The change came from https://github.com/mollie/magento2.
Our constructor was the following:
This was fine for
Hope, I could make it obvious, what I mean. |
Interesting i believe this should have flagged definitely an issue to review |
Hey @norgeindian So I've updated the phpunit test for the preference and it works just fine for me #107 The preferences logic doesn't do any deep analysis of what has changed, only that its a PHP file and it is has a preference attached. I think that even a whitespace will be enough to create a diff, which will be picked up by the tool which will scan the filepath and pass it through the following code I would have expected you to have some output like
If you have time I'd recommend following the steps on https://github.com/AmpersandHQ/ampersand-magento2-upgrade-patch-helper/blob/master/docs/TROUBLESHOOTING.md#debug-a-specific-file to debug this specific file and maybe run through xdebug to see why it was not being reported? |
Hi @norgeindian, is this still an issue? Just reviewing open issues and seeing where we're at 😄 |
We have a preference on class X in which we extend the overridden class and call the constructor of the parent.
During the latest update, the constructor, which we call, has changed. One more parameter has been added.
This issue has not been found by the helper, but leads to a critical error.
It would be awesome to find a way to catch these kind of problems as well.
The text was updated successfully, but these errors were encountered: