Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:117125 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 76191 invoked from network); 23 Feb 2022 16:42:38 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 23 Feb 2022 16:42:38 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 8C4851804B3 for ; Wed, 23 Feb 2022 10:02:24 -0800 (PST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-1.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,FREEMAIL_REPLY, 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-ASN: AS15169 209.85.128.0/17 X-Spam-Virus: No X-Envelope-From: Received: from mail-ed1-f47.google.com (mail-ed1-f47.google.com [209.85.208.47]) (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 ; Wed, 23 Feb 2022 10:02:24 -0800 (PST) Received: by mail-ed1-f47.google.com with SMTP id w3so45517858edu.8 for ; Wed, 23 Feb 2022 10:02:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=yBhfbFKUmok4QW3A/mHmZZRnyuGJDwdWM1p3yyKPtpI=; b=nVX3XZa4Da/i98kzBgi2GnLQFAxNtCWL7GLFqCNGZuaXZpXyvO+l3PuZW0k12nQIWN BEE2gS73kpe0qdREyVFjmMyTUFmyLEnSVZNXsUeM3JksXHpm95RWRfBXrCfaxzrdpm9Y FoA2uaMhR4OGPHz6HZW9Cc3pDsaShRSEKM9Ug1tzTU+feBSN51TowjvktN+CcUQCgnky ZUw4HN07n71aAHFsR4yW4s1j/4dTHccpv2NQLQlEybYnPOlauS0AnpvGsdYwl1K1m35U iEunj47abyucSHj2vcM/lHFc9qwvlqh+KPbZxDVpB+m5IrEpgEAWjX0PWWimCttIxohk n8Fg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=yBhfbFKUmok4QW3A/mHmZZRnyuGJDwdWM1p3yyKPtpI=; b=7QVdtCtIPJMc6hK9KhD+hvXy6KMrkiMsZYDOOR1RBMQ0wV7zV1cZPmyl8oqsdblRkh ssJaFClkSuaWjrqDAPCXiYWPhNKgfr7fBWq+sm60VwxHzobo6+rXDkX4Rj2vVrrWzt+I DOOuUb4QOWQhzH31Pjjv5QSG7WkStnkk63rtQLFG7NxSRkuqdRdKvZRMf3rhVNeKHnum tjKl6NigA+9jPkXH+L8C3y41AeAvIAtV7deD5VDeV08i1NSWDfMIZKYbkERa1TZMp9Iy gO9UFVf3YoEup0X/32yWq6sjhgroX0c5N80dGbnDukGd0D+2MSWFab23CZ8/tN0/yWOd 7Spw== X-Gm-Message-State: AOAM532sOuTcB9PtqbYhr+Ye2BtEIx1l8v36WT6tYjmPNTGvNyyBpDtM 2ARFqXdeikJs1XSMoKC/tw6mCot+DjENwkp+lpg= X-Google-Smtp-Source: ABdhPJxeEsNc/JFvpQVvE7Hqym2V9zfePzZv5+f2MIgqP58xB4tN7c0l3bEDftyv3GufOi9b50T+Y8Bpnqa6iuM6DRA= X-Received: by 2002:a05:6402:c5:b0:413:39f9:5757 with SMTP id i5-20020a05640200c500b0041339f95757mr553551edu.437.1645639342298; Wed, 23 Feb 2022 10:02:22 -0800 (PST) MIME-Version: 1.0 References: <620eda0f.1c69fb81.d2cb1.0846SMTPIN_ADDED_MISSING@mx.google.com> <5efecaef-a024-3c61-e12e-ffc342956718@gmail.com> <6214c40e.1c69fb81.73261.05d3SMTPIN_ADDED_MISSING@mx.google.com> <0ce34a07-3ad7-7158-d914-c18f3720ff9d@gmx.de> In-Reply-To: <0ce34a07-3ad7-7158-d914-c18f3720ff9d@gmx.de> Date: Wed, 23 Feb 2022 19:02:09 +0100 Message-ID: To: "Christoph M. Becker" Cc: PHP Internals List Content-Type: multipart/alternative; boundary="0000000000006d1d0a05d8b344cb" Subject: Re: [PHP-DEV] [RFC] Undefined Variable Error Promotion From: nicolas.grekas+php@gmail.com (Nicolas Grekas) --0000000000006d1d0a05d8b344cb Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Le mer. 23 f=C3=A9vr. 2022 =C3=A0 17:59, Christoph M. Becker a =C3=A9crit : > On 23.02.2022 at 16:29, Nicolas Grekas wrote: > > > Le mar. 22 f=C3=A9vr. 2022 =C3=A0 14:56, Marco Pivetta a > =C3=A9crit : > > > >> On Tue, Feb 22, 2022 at 2:53 PM Nicolas Grekas < > >> nicolas.grekas+php@gmail.com> wrote: > >> > >>> But this makes me think: we should trigger a deprecation just before > all > >>> corresponding warnings! > >> > >> Please, no more deprecation warnings, make it stop =F0=9F=98=A5 > >> Yes, undefined variables are a problem, but I just spent 6 months in > >> `vendor/` code for 8.0->8.1 stuff, and it doesn't bring anything but > >> frustration: this stuff is statically introspectible, and even more > >> side-effects are just more trouble. > > > > I'm not going to be affected by this RFC at all, and neither are you, > since > > we use throwing error handlers. But ppl that do rely on code bases that > > have undefined vars "by design" will be. I would bet that the number of > ppl > > in that affected group and that also use a static analyser is very very > > small. This means that static analysers are not a pragmatic solution > here. > > That. > > > Ppl that don't use static analysers deserve a prior notice. There is a > > dedicated reporting mechanism in place and we should use it IMHO. With > new > > deprecations added to PHP 8.1, the ecosystem realized that the tooling > > needed to improve - and it did (phpunit, Laravel, etc.). We can and > should > > add new runtime deprecations when planning a BC break. > > > > Please consider adding this deprecation Mark (and others.) > > Do you mean E_DEPRECATED in addition to E_WARNING, or instead? I > wouldn't be happy either way. > I mean in addition yes, deprecation before warning. I considered grouping them as E_DEPRECATED|E_WARNING but that'd break many userland error handlers I fear. --0000000000006d1d0a05d8b344cb--