GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
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
Inheritance checks should not ignore parents if these implement an interface or abstract.
Link for bugsnet: https://bugs.php.net/bug.php?id=73987
Inheritance checks should not ignore parents if these implement an in…
@nikic @bwoebi can I get your input on this please ... it may be pernicious to merge this into released branches right now ?
Added tests demonstrating the same effect with abstracts
IIRC the rule is that an incompatibility with an interface throws a fatal error, while an incompatibility with a (non-abstract) class signature only generates a warning. As such, shouldn't this be a warning? (Same for the other cases as well, of course).
Nevermind, just saw that we always fatal for return types. In that case it's fine.
Looks good to me. I'd recommend landing this in 7.1+ only for now, as there is a potential of fallout from code that accidentally specified wrong signatures due to this bug.
Thanks for the review! Agreed
Fixed incompatible declaration of Noop::storeContents in php7.2
See the reason:
The behavior was changed with this PR: php/php-src#2342 but somehow got left undocumented in upgrade file.