Re: [RFC] Allow void return type variance

From: Date: Mon, 04 Feb 2019 08:00:42 +0000
Subject: Re: [RFC] Allow void return type variance
References: 1 2  Groups: php.internals 
Request: Send a blank email to internals+get-104101@lists.php.net to get a copy of this message
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.

« previous php.internals (#104101) next »