Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:113849 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 49965 invoked from network); 29 Mar 2021 09:22:40 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 29 Mar 2021 09:22:40 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 9A7761804E2 for ; Mon, 29 Mar 2021 02:19:39 -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=-0.4 required=5.0 tests=BAYES_05,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, 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-f41.google.com (mail-lf1-f41.google.com [209.85.167.41]) (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 ; Mon, 29 Mar 2021 02:19:39 -0700 (PDT) Received: by mail-lf1-f41.google.com with SMTP id b4so17379785lfi.6 for ; Mon, 29 Mar 2021 02:19:39 -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=/rwKs+9YBBxKE5TLoeTpfywXpZX5eHLOfGQkEv8EkM8=; b=sunq2q5Rtu3iE1EUBrN+GpEz6+qXmIhgWs40KuFKOtIicwvkz7aJymv7kwnfhGPwSa L5xhPWCpvMi0cCluDIShmRW6DBM4F6wv0To4iQEDOrNFDC4sWl0bon9yd6xHoQ2KLxQD 1WjNNonqgBQLAaEIQ5dszY4mLUyp0vHTjg2d++CYuorvsZq8Qej5Nt3I6gG86sMUTgR3 T9WngiOx0ytEhUKJ+SGHHve6I8i78m34fuUXDwFLYNzrIBdvf345U7R4nUIAXfzqqEor XzMv/M1JTngpYqPeTqVqtyCZU6GfibKBHxi34/iPSVA7bf5XsupvQMAMcaH+zv45KLps E5Tw== 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=/rwKs+9YBBxKE5TLoeTpfywXpZX5eHLOfGQkEv8EkM8=; b=Wa05rlR64VY7wOvlznyIAmw3CeDFoBL9VMHX+QoOgS7Y2WcvZiXY+MBFb7bT6o6AHf l3ezjN4nKFPaqPS1Y6ucV+gug4l44Fa3e8MGkf8ieH9UVKHZM9WIrQmew0Mg5E3FL+Ft r4oDBZ+pDAn5Yows2S9E7YP8BiCn2e3Fu9NMvj9RH6J30GXNeZC7vQNaPCoRTiP7JKr6 Yl7nrkZHnRA1vRsDY6uzRhBceQmxWeGzUh3CKTYfWxfOxfG7QxgH9mWf4ewRKjRH1DFL wF0a5lcvaPAKFaenp+852NA7oQpKHowf/DnPw6eVup8dumoa5r11V/oPzxKSHJK2O0Wo b02Q== X-Gm-Message-State: AOAM533ctsD0MijlBDcUW1PbXElEchs5A7G6cqlMnFE+jYSeuL/Rw7sK h+0mPEgo+MyptBtL3p1ddnpSDlxzEsAOjTHUXkI= X-Google-Smtp-Source: ABdhPJzUqJ9VLskOCzyalj0Sh5HAe5CYuuI18x0TrrRlS92XDgMwY/uOcrOawnFMF5+SdTrchRiTAPqLOOKFSM3CYeI= X-Received: by 2002:a05:6512:3298:: with SMTP id p24mr15075982lfe.221.1617009577564; Mon, 29 Mar 2021 02:19:37 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: Date: Mon, 29 Mar 2021 11:19:26 +0200 Message-ID: To: Nicolas Grekas Cc: PHP Internals List Content-Type: multipart/alternative; boundary="000000000000781e5e05bea961d4" Subject: Re: [PHP-DEV] [RFC] [Discussion] Adding return types to internal methods From: kocsismate90@gmail.com (=?UTF-8?B?TcOhdMOpIEtvY3Npcw==?=) --000000000000781e5e05bea961d4 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable > For userland, there are already ways to declare the planned return type > (aka @return in phpdoc), so we might not need any new way to declare this > from the engine pov. > Yes, I think I agree, but I'd be curious about Nikita's opinion as well, since he brought up this problem first. > We should replace the SuppressReturnTypeNotice by the TentativeReturnType > one right away. The TentativeReturnType would mean: "I'm going to add a return type to this > method in its next major". > As a consequence, for child classes of internal methods, this would > suppress the notice. > If we get rid of the userland part of my proposal, then I think we can really rename SuppressReturnTypeNotice to TentativeReturnType. > As a corollary, adding this attribute should conflict with having a real > return type. This is the only questionable part for me, because then this RFC would cause more trouble for overriding methods which already define a wrong return type: a deprecation notice would always be triggered for them on PHP 8.1+ until return types are fixed or removed. And as we discussed it previously, fixing them is not always possible. Or is there any specific reason I'm not aware of why you favor this behavior? M=C3=A1t=C3=A9 --000000000000781e5e05bea961d4--