Thank you for the feedback and discussion on the Covariant Returns and Contravariant Parameters RFC.
I have opened voting on this RFC. Given that this is a common time for holidays for many people around the world it will be open until at least January 2nd. Happy holidays!
Thank you for the feedback and discussion on the Covariant Returns and Contravariant Parameters RFC.
I have opened voting on this RFC. Given that this is a common time for holidays for many people around the world it will be open until at least January 2nd. Happy holidays!
Currently there are 31 yes votes, and only 1 no vote. I will leave the vote open for a few more days while I examine an issue that Dmitry mentioned here on the list. When we have code like the following, no errors or warnings are generated but there should be a warning:
<?php
class A {}
class X {
function m(A $z) {}
}
class Y extends X {
function m(NotAnA $z) {}
}
?>
I am intentionally not generating a warning at runtime for some cases. The engine already issues a warning at compile time for some similar cases and I didn't want to duplicate the warning at runtime. Apparently this code is not precise enough.
Quoted text · 5 lines
Thank you for the feedback and discussion on the Covariant Returns and Contravariant Parameters RFC.
I have opened voting on this RFC. Given that this is a common time for holidays for many people around the world it will be open until at least January 2nd. Happy holidays!
Currently there are 31 yes votes, and only 1 no vote. I will leave the vote open for a few more days while I examine an issue that Dmitry mentioned here on the list. When we have code like the following, no errors or warnings are generated but there should be a warning:
<?php class A {} class X { function m(A $z) {} } class Y extends X { function m(NotAnA $z) {} } ?>I am intentionally not generating a warning at runtime for some cases. The engine already issues a warning at compile time for some similar cases and I didn't want to duplicate the warning at runtime. Apparently this code is not precise enough.
I have a new pull request:
https://github.com/php/php-src/pull/3732
This fixes all currently known issues with the implementation, including the snippet from my last message. There are a few todo items left that may have issues, but so far we haven't hit those cases in any code.
I intend to close the vote in a day or two, unless I hear of new issues from Dmitry or others.
I intend to close the vote in a day or two, unless I hear of new> issues from Dmitry or others. Any news here?
--
Christoph M. Becker
I sent this a week ago to Christoph only; oops.
I have not heard any news. The vote is now closed. The RFC passes 39 in favor to 1 against.
Special thanks to Nikita and Dmitry who have helped find issues and review the patch. It will not be merged until the implementation quality is satisfactory.