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

Bugfix for #73987 #2342

Closed
wants to merge 2 commits into
base: master
from

Conversation

3 participants
@pmmaga
Contributor

pmmaga commented Jan 27, 2017

Inheritance checks should not ignore parents if these implement an interface or abstract.

Link for bugsnet: https://bugs.php.net/bug.php?id=73987

@krakjoe krakjoe added the Bugfix label Jan 27, 2017

@krakjoe krakjoe self-assigned this Jan 27, 2017

@krakjoe

This comment has been minimized.

Show comment
Hide comment
@krakjoe

krakjoe Jan 27, 2017

Member

@nikic @bwoebi can I get your input on this please ... it may be pernicious to merge this into released branches right now ?

Member

krakjoe commented Jan 27, 2017

@nikic @bwoebi can I get your input on this please ... it may be pernicious to merge this into released branches right now ?

@nikic nikic self-requested a review Jan 27, 2017

?>
--EXPECTF--
Fatal error: Declaration of B::example($a, $b, $c = NULL) must be compatible with A::example($a, $b = NULL, $c = NULL) in %s

This comment has been minimized.

@nikic

nikic Jan 27, 2017

Member

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).

@nikic

nikic Jan 27, 2017

Member

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).

This comment has been minimized.

@nikic

nikic Jan 27, 2017

Member

Nevermind, just saw that we always fatal for return types. In that case it's fine.

@nikic

nikic Jan 27, 2017

Member

Nevermind, just saw that we always fatal for return types. In that case it's fine.

@nikic

nikic approved these changes Jan 27, 2017

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.

@pmmaga

This comment has been minimized.

Show comment
Hide comment
@pmmaga

pmmaga Jan 27, 2017

Contributor

Thanks for the review! Agreed

Contributor

pmmaga commented Jan 27, 2017

Thanks for the review! Agreed

@krakjoe

This comment has been minimized.

Show comment
Hide comment
@krakjoe

krakjoe Jan 28, 2017

Member

Merged b67eb34

Thanks.

Member

krakjoe commented Jan 28, 2017

Merged b67eb34

Thanks.

@krakjoe krakjoe closed this Jan 28, 2017

eXtreme added a commit to eXtreme/flysystem-cached-adapter that referenced this pull request Jun 5, 2018

Fixed incompatible declaration of Noop::storeContents in php7.2
See the reason:

https://3v4l.org/VDT0P

The behavior was changed with this PR: php/php-src#2342 but somehow got left undocumented in upgrade file.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment