On Wed, Dec 19, 2018 at 4:10 PM Levi Morrison <[email protected]> wrote:
>
> Thank you for the feedback and discussion on the [Covariant Returns
> and Contravariant Parameters RFC][1].
>
> I have opened [voting on this RFC][2]. 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!
>
> [1]: https://wiki.php.net/rfc/covariant-returns-and-contravariant-parameters
> [2]:
> https://wiki.php.net/rfc/covariant-returns-and-contravariant-parameters#voting
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.
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php