Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:101784 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 36930 invoked from network); 6 Feb 2018 15:49:41 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 6 Feb 2018 15:49:41 -0000 Authentication-Results: pb1.pair.com smtp.mail=rowan.collins@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=rowan.collins@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 74.125.82.49 as permitted sender) X-PHP-List-Original-Sender: rowan.collins@gmail.com X-Host-Fingerprint: 74.125.82.49 mail-wm0-f49.google.com Received: from [74.125.82.49] ([74.125.82.49:32793] helo=mail-wm0-f49.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 9D/D4-49805-49EC97A5 for ; Tue, 06 Feb 2018 10:49:41 -0500 Received: by mail-wm0-f49.google.com with SMTP id x4-v6so18451375wmc.0 for ; Tue, 06 Feb 2018 07:49:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=Dayn6h+57mv8JdgVUQAxk8KqZyMnRyjhnse8IUkDFGo=; b=cexjrHYcZRoI84MJc8wNIUqkw8kBvmr6lqdnYgRXQObx4GjXk0Exf9H29vLsOf/neh 8HPBZ6YudDda96QT6X5M/yQlF+HaxdqC3Jk2pE+Q0DPf9VeY3S639IySD93+8s8SnhG9 A06D/JaBLSevdlcBoB097VdSNLgxHSdnR++wF/aOE/zfnTUd77Tyaf+tkLpZ7wRxynA1 Kg/ev9hQfC7qpuG3eg/uvIgn9QLn7vIXAZw+enHsK8KKzdtHXga5H1zGr3QuT5LeyiQC SlUgduWX+Jg0IGUxdiAmU0OPGSUAHPibmTfbg5p8XqPLVFueT0e9TnGeAhYxPvRUwzkW 50kg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=Dayn6h+57mv8JdgVUQAxk8KqZyMnRyjhnse8IUkDFGo=; b=JH38tjokCtBBzOmAp9XIpmpkKFcoC5zOHqLPiuMW5beQHFdM0OUmmbComV213NSrRe XlOK9/UFVzWqvRwpFyJtlZ7mkRUpSuLKxh8VxRus2hwg22OMulQdM1xSscvgpiUgPiFq 8M2wcMzYxooZydlRxMIjj/zyUYLKqgh+ftCtJaPPB7aNcIEVGDL2TM8k52MOMPBeW2ce gPKQTpYn1NOeCM9kqHdxAuAt3kXXOx0h8qizFkxdmGbIHt7SD9tnJCC1S6LIw4U4wuou hbSZHccckjVj5LhwXC4nh50lMvT1nPUGQJQDOjK+s5z3WiHbuQAOOEVz23dZKhcMMEdg o5cw== X-Gm-Message-State: APf1xPC7s5vF/KVO2yfooeT0CDaL+v2jQDOvOi1llwstHMDnoNKhXoj1 7yTO2vYptxUinsVFYlA0vWAEuQTusTzbLCDJzG4= X-Google-Smtp-Source: AH8x22550ZiYTxqcdAkYfy8HAq1Wsz1d0Ao5tjAixLKHjscKzcZ7fwKhqoRwRyTGf9OpeHq8KvjPxR9H4pv/UJzkcZE= X-Received: by 10.80.181.197 with SMTP id a63mr4422159ede.138.1517932178073; Tue, 06 Feb 2018 07:49:38 -0800 (PST) MIME-Version: 1.0 Received: by 10.80.222.195 with HTTP; Tue, 6 Feb 2018 07:49:37 -0800 (PST) In-Reply-To: References: <07d9e3a0-d516-aa77-4818-ce8b02e8dd08@gmail.com> Date: Tue, 6 Feb 2018 15:49:37 +0000 Message-ID: To: Levi Morrison Cc: PHP Internals Content-Type: multipart/alternative; boundary="94eb2c194ade446db805648d201c" Subject: Re: [PHP-DEV] [RFC][DISCUSSION] Deprecation of fallback to root scope From: rowan.collins@gmail.com (Rowan Collins) --94eb2c194ade446db805648d201c Content-Type: text/plain; charset="UTF-8" On 6 February 2018 at 14:36, Levi Morrison wrote: > > That's why I think having some concrete benefit much sooner is the only > way > > to stop people resenting this change. Build function autoloading in a way > > that it only works if you opt out of the fallback, and *then* deprecate > the > > fallback mode, and it feels like progress rather than disruptive > tinkering. > > This thinking is too pessimistic. We cannot design to appease our > worst users. The advanced notice is better than a sudden one even if > we have function autoloading. > Perhaps I wasn't clear; I'm not saying the transition should be more sudden, I'm just saying that we should introduce an opt-in advantage alongside the flood of messages. As I understand it, the timeline you support is: * Raise E_STRICT in PHP 7.3. * Once we have a plan to actually change the behaviour, move to E_DEPRECATED, e.g. in PHP 7.5, or 8.0. * Remove fallback at the same time as introducing autoloading, in PHP 8.0 or maybe 9.0. The timeline I am suggesting is: * Add an opt-in feature which enables some advantage, probably autoloading, as soon as possible, e.g. PHP 7.3 or 7.4 * Raise E_DEPRECATED for code which doesn't opt in and doesn't fully-qualify function names, once usage is established, e.g. PHP 7.5, or 8.0 * Remove the fallback mode as a purely internal change, in PHP 8.0 or 9.0. People would still be changing code on much the same timeline, but we wouldn't have the long period of telling people to change all their code without any benefit to them or us. I also think it's a stretch to call people affected by this change "our worst users". I don't know if any common coding standards cover leading backslashes (I searched the PSR-12 draft and Drupal style guide and neither seems to mention it) but if they do, they're as likely to say "never add them" as "always add them", particularly given their use as a hack to "mock" global functions. Or perhaps by "worst users" you mean "users not willing to change their code" - in which case remember that this is a disruptive and risky change to an entire code base for no immediate benefit; putting off such a change might be a perfectly rational decision. Regards, -- Rowan Collins [IMSoP] --94eb2c194ade446db805648d201c--