Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:114712 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 74200 invoked from network); 3 Jun 2021 14:41:41 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 3 Jun 2021 14:41:41 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 58922180502 for ; Thu, 3 Jun 2021 07:55:13 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,HTML_MESSAGE, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.2 X-Spam-Virus: No X-Envelope-From: Received: from mail-lf1-f48.google.com (mail-lf1-f48.google.com [209.85.167.48]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Thu, 3 Jun 2021 07:55:12 -0700 (PDT) Received: by mail-lf1-f48.google.com with SMTP id i10so9287038lfj.2 for ; Thu, 03 Jun 2021 07:55:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=yC5JrYSw+BwVpvfQrJodvPZpZp1UgO0TbRsCGq7akyk=; b=r3b1Y6SMpIZUL5RJDps8def3CaZTFIMSuEG2+dRf4IivvWAlBrxTTeWLfDHU62AClq B2BVHNL9GnMNIq1nrlH+Af3kqy36WLQrbA3CsifNPB7sAHEs7wRfQpFwg2FCdN79YfAo FMnNdveRrN623iAgCF/tfkVrHz/S237dxyGdCw3bFviaIw9CYqxahAQ+WwOwYTu8qXTr pEZFfdHoQQrEhEcjA3E9+SXuNt1Lm3PfzsRahhus8Q0uzx3gd2PcQBw6lPK/UZdIBgX+ HsSZo/j+O6AC6hjNaXtFT0LMkwWdBZgMsUaPd269S/rv2Y9QW9e/b3gykXswBMIjqFK0 zSCw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=yC5JrYSw+BwVpvfQrJodvPZpZp1UgO0TbRsCGq7akyk=; b=Zdo1WLxfsOFTv27jFwTGrypg9jcwlNJS9YRk7/kNX7HmBvCQd9s6R/VtJ/bh+Ie1Vg jlKnlIjZ4XdcsAb6/hsP7e+TpacMPAntNUXvdjuOOK9YKw9OhUhjrguEgaXJCpEIZrwI W+NzVhwPzATzRcF4BGsoVMnacV85K+5PDDLTmo0JjZ7GtSkyQPWOml31jx4f7zxaD/5c fDfDkmnfntZCpvgmnVOtZGIY6O6b9gBc2hLDGhW7+kjmjrL4oEEa14YVYT/Bx3FQw8NG cpbLGPpXcGSTg8oHCALplRIxBFtfD1lTctjc25QRuUzR/7iidd38wKmwymu+htGCusI3 OFMg== X-Gm-Message-State: AOAM533XXd9C4dVV08zY0Bf187b5MSEhaFAPXkeQUpuqKKUnRDucOMat y92cYHSYUlmaY39DO8prAN9WVq6evCXnIn1u5OU= X-Google-Smtp-Source: ABdhPJwRW3ObaJrjw/E9kj6o+/z7X1l4u5vxz5IJ60rFrdW+gfRUGzqMp/YsF5NVQdqHQyAbL6hrAT4OZROKf28Jzbw= X-Received: by 2002:a19:7dd7:: with SMTP id y206mr79755lfc.44.1622732111353; Thu, 03 Jun 2021 07:55:11 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: Date: Thu, 3 Jun 2021 16:54:55 +0200 Message-ID: To: =?UTF-8?B?TcOhdMOpIEtvY3Npcw==?= Cc: PHP Internals List Content-Type: multipart/alternative; boundary="00000000000010198905c3ddc3ef" Subject: Re: [PHP-DEV] [RFC] [Vote] Adding return types to internal methods From: nikita.ppv@gmail.com (Nikita Popov) --00000000000010198905c3ddc3ef Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Thu, Apr 22, 2021 at 9:42 AM M=C3=A1t=C3=A9 Kocsis 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=C3=A1t=C3=A9 > 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 --00000000000010198905c3ddc3ef--