Re: [RFC] Allow void return type variance
| From: | Girgias | Date: | Mon, 04 Feb 2019 11:39:41 +0000 |
| Subject: | Re: [RFC] Allow void return type variance | ||
| References: | 1 2 3 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-104111@lists.php.net to get a copy of this message | ||
Isn't this "fixed" with the Covariance/Contravariance RFC which has been
voted recently
George P. Banyard
On Mon, 4 Feb 2019 at 08:58, Wes <netmo.php@gmail.com> wrote:
> Hi!
>
> PHPUnit 8 changed e.g.
function setUp(){} to ` function
> setUp():
> void{} ` and a lot of people did not like being forced to do the same on
> their setUp().
>
> The issue is not PHPUnit adding void, but PHP forcing
> void even when
> it's not necessary. If PHPUnit wants to use void but inheritors don't want
> to, it should just be possible.
>
> "probably a bad idea" is opinionated, in reality there is no provable
> reason to disallow it, from a pure type-theory standpoint.
>