On Thu, Apr 22, 2021 at 9:42 AM Máté Kocsis <[email protected]> wrote:
> Hi Internals, > > I've just opened the vote about > https://wiki.php.net/rfc/internal_method_return_types > and I will close it on 2021-05-06. > > For prior discussion, please see https://externals.io/message/113413 > > Regards: > Máté > One implication that I didn't fully appreciate is that this also applies to interfaces. The migration to tentative return types hasn't finished yet, but we already have interface JsonSerializable { function jsonSerialize(): mixed; } Which requires implementers of that interface to also specify "mixed" or a subtype of "array" in the implementation. I expect that there will also be at least interface Countable { function count(): int; } This feels a bit different than the class case, in that implementing internal interfaces is common, while extending internal classes is mostly an artifact of us not adding enough "final"s in the early days. I'm okay with this, but wanted to point it out. Regards, Nikita
