Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:113664 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 46882 invoked from network); 22 Mar 2021 12:37:13 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 22 Mar 2021 12:37:13 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 0311B1804B7 for ; Mon, 22 Mar 2021 05:32:29 -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_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.2 X-Spam-Virus: No X-Envelope-From: Received: from mail-ej1-f42.google.com (mail-ej1-f42.google.com [209.85.218.42]) (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, 22 Mar 2021 05:32:28 -0700 (PDT) Received: by mail-ej1-f42.google.com with SMTP id r12so20963664ejr.5 for ; Mon, 22 Mar 2021 05:32:28 -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=uevfQsEft3cywuS7eyj/tAugs7MyMSxZVGb/UYhERUc=; b=E2hssGws3QZOYRHTkieH8fXTIAwp1MK2lIXhTob7Jy2m2eklgSkcLr51fAs98ohJwZ HV2T9Xwzgul5FhH9vUJE1lmClOGZUrBjmUPdt1zMyKKjNulXZUgMus0FX2GjpXVYceXF MXyehWKm+O3bAYR12zMwA6Pz2u0Dbe+f8BLYkjF9/S3WbqVcNmBW6Y5wSBntmW9K9zOR g8WIotcczDmvHwJey969B7LUKazTPkSraRWC6L3K4ixfDUVmcM/L87Q/4yEWfHuKxXiv Gt60xrcC8LW0x/8PL6IEiXQ0qcCfh3GdUXDYAsa2R7kcP9+hRxNW/xszdOUbA3/0x9cc DFyg== 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=uevfQsEft3cywuS7eyj/tAugs7MyMSxZVGb/UYhERUc=; b=W7g0kjTKOas315SMyMiri7AUV7E7RE4+Co98szUIdi9IDqX15c3/Ees5v+teQSfV9C Px3qd9m+cWaUwTPUTufsAZMXymDY30fjIve+UgtQKDWLXzwElitpEcjVfGPZw1k0iD3X /csmcOws7SAjGXehkWhyJxt0YVbivazy5PAMtYOSOyKwGXjiVbyFohXB+NzO5yuutsMt mm7W1anu7zpV5p5fmrbCz71zpKs7d598qHBbc2P8W47dvq7EMCCLQM3IW80ETvtOXIYq IJKmOUig+CXzPn8yFoJ5MkKzp87laNCMHKdUhy51GpxU0mw2wOJfbL+h1zGurSLkSNXk wggg== X-Gm-Message-State: AOAM533CQHG59Pn/HCwIJ/6t+/jkWp0hakyMjfVJc7jxf5QMREpsYLed TA+f5M8fQwoUpy6ecovmiygZ8MONGrNabQJQ+L4= X-Google-Smtp-Source: ABdhPJyrCWLTHqv1aad8U5P5AuuzoD6Lc/cXd6OFMtbNg9NSx/4Ua/FmoF9qmEPpFiH9pLr+B4psk9/hH+FUK9qo5h8= X-Received: by 2002:a17:906:2504:: with SMTP id i4mr19396243ejb.115.1616416344668; Mon, 22 Mar 2021 05:32:24 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: Date: Mon, 22 Mar 2021 13:32:12 +0100 Message-ID: To: =?UTF-8?B?TcOhdMOpIEtvY3Npcw==?= Cc: PHP Internals List Content-Type: multipart/alternative; boundary="000000000000087b1c05be1f4215" Subject: Re: [PHP-DEV] [RFC] [Discussion] Adding return types to internal methods From: nicolas.grekas+php@gmail.com (Nicolas Grekas) --000000000000087b1c05be1f4215 Content-Type: text/plain; charset="UTF-8" > > I've updated the RFC with the following things: > - The proposed error level is now E_DEPRECATED instead of E_STRICT > - I added a new section for exposing the behavior to userland (this is a > separate vote) > To build on your approach and mixing it with the need we discussed for userland, I have a new proposal: 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. 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. As a corollary, adding this attribute should conflict with having a real return type. That would allow userland libs to immediately adopt the tag and be ready for PHP 8.1. WDYT? --000000000000087b1c05be1f4215--