-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Zend: Make Closure covariant to callable #15492
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
Conversation
What about all classes with |
I don't think there is an "easy" solution for this because PHP is nominally typed and there isn't an interface that is auto-implemented (or manually required) for classes that can be invoked. It could be done by inspecting the CE to see if the |
I see, makes sense, we'd need a |
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 think this makes sense.
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.
This makes sense and I can't find any issue or BC break with this change.
I'm not sure if this requires an RFC.
e907b0e
to
fec1664
Compare
Caused by phpGH-15492. While the parent might contain callable, it may also contain other types. zend_is_class_subtype_of_type() may be checking a member that is not callable itself. Discovered by a failing Laravel test in nightly.
Caused by phpGH-15492. While the parent might contain callable, it may also contain other types. zend_is_class_subtype_of_type() may be checking a member that is not callable itself. Fall back to the normal class subtype check. Discovered by a failing Laravel test in nightly.
Caused by phpGH-15492. While the parent might contain callable, it may also contain other types. zend_is_class_subtype_of_type() may be checking a member that is not callable itself. Fall back to the normal class subtype check. Discovered by a failing Laravel test in nightly.
Caused by phpGH-15492. While the parent might contain callable, it may also contain other types. zend_is_class_subtype_of_type() may be checking a member that is not callable itself. Fall back to the normal class subtype check. Discovered by a failing Laravel test in nightly.
Caused by GH-15492. While the parent might contain callable, it may also contain other types. zend_is_class_subtype_of_type() may be checking a member that is not callable itself. Fall back to the normal class subtype check. Discovered by a failing Laravel test in nightly.
Pointed out by @ondrejmirtes