Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:110911 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 26941 invoked from network); 10 Jul 2020 10:03:16 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 10 Jul 2020 10:03:16 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 560C31804B5 for ; Fri, 10 Jul 2020 01:54: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.2 required=5.0 tests=BAYES_40,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-lj1-f170.google.com (mail-lj1-f170.google.com [209.85.208.170]) (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 ; Fri, 10 Jul 2020 01:54:38 -0700 (PDT) Received: by mail-lj1-f170.google.com with SMTP id r19so5538901ljn.12 for ; Fri, 10 Jul 2020 01:54:38 -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=2I0KoZ8mZ9CTjE19a+dYkOnRTGUMQ5wWNAsgWnzNE00=; b=HlsM3VwRwi8TwOnHMIw78P87jvSSDNF+FrBmm42j4CfxNLo7YDdMlEWiN58sxnMpNP Xs7646MsmM7VlSpFACZX/UgE5nGHVbG9ULtJgF1M/c6atQ4++++lbfteBnkeFDeS2X87 ymHp+bSfpoi0kMXe5hC6Q6jAqcnTlGxbZH7e0xtMXaQfuoakQpLvuHhR23XCAH7r22Bp Ca9AwsWC3PJ5yRtzj26uy0Ac/67JHky4nCOiwKTZaQtsna8buHIDigsada3qMZyFaJZq +Wk8Wt+8lbtDuOp+jE0uLRZdQszqGskCPA07PGeI+dhMSiUVVy+D4xjyjaWg17bkctzx +Ecg== 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=2I0KoZ8mZ9CTjE19a+dYkOnRTGUMQ5wWNAsgWnzNE00=; b=IAip4OCS2HmS/2Gf0Jxq+C9KzxTDt3iKsKJuXKyiMPgh9pQtihUgZQqc5UBWDwRN09 tC/DtdQjbJbqlG3f21YyljtazuYTNhQZuuhYo0dheG/zpj/gSe5GbBfqvgMYxgXXiItM RmBuMzgWHXDVat8tugh96qHMfvF3mMSDcS0YmVTdeUjO+WoJnUF2Leaijxns9ZhjsIp/ x1EsM8rdZPk1xzyWA8OnYwd/M/SebwLBnQ15G2l78cXvlBfgpThDbbzL4ucBk8Af3+Al o1m621/DTnCNzjhB8dxnGjV6Z+0U9qVWrL82Ks50yuZv+LGKteY4A8u6+ERwRPcbE1KW CthA== X-Gm-Message-State: AOAM533GcZczNU2pNkOyfQpxitHGgw6Ls8BxrMATDrhsC0uOlSlnnT0Y dhOCOKePGlnu71DBA8SEja8ZCmdulBCW/6Y6Hq8= X-Google-Smtp-Source: ABdhPJwOtmK7w0f9WX6coqhZSm3/pRXIKnNCjuIBS6WUEj5qJrdo/2oSHGYSOmiqcFw4fMgZdEMO8u4KyXa+MX1Y1Vo= X-Received: by 2002:a2e:850b:: with SMTP id j11mr41246714lji.30.1594371277129; Fri, 10 Jul 2020 01:54:37 -0700 (PDT) MIME-Version: 1.0 References: <0771c3ac-53ec-4a7f-a4e9-6ae3c9b1f1f6@www.fastmail.com> <49fd7972-8cec-4207-99af-6c77c2328211@www.fastmail.com> In-Reply-To: <49fd7972-8cec-4207-99af-6c77c2328211@www.fastmail.com> Date: Fri, 10 Jul 2020 10:54:21 +0200 Message-ID: To: Larry Garfield Cc: php internals Content-Type: multipart/alternative; boundary="0000000000009d0cae05aa127d38" Subject: Re: [PHP-DEV] [RFC] \PHP namespace usage heuristics From: nikita.ppv@gmail.com (Nikita Popov) --0000000000009d0cae05aa127d38 Content-Type: text/plain; charset="UTF-8" On Tue, Jul 7, 2020 at 4:47 PM Larry Garfield wrote: > On Tue, Jun 23, 2020, at 7:30 PM, Larry Garfield wrote: > > Greetings, Internalians. > > > > There has been much talk of the \PHP namespace of late, including one > > unsuccessful RFC. In the discussion, the pushback broke down into two > > main camps: > > > > * We should never namespace anything ever. > > * We can namespace things but we need something more concrete than > > "RFCs can namespace things if they feel like it." > > > > I can't do much about the former, but the latter is a solvable problem. > > To that end, Mark Randall and I have put together a new RFC on the > > topic, based on a fruitful discussion in Room 11 a few weeks ago to > > brainstorm what actual guidelines should be for what goes where. > > > > https://wiki.php.net/rfc/php_namespace_policy > > > > This proposal provides guidance to short circuit future subjective > > bikeshedding, while still leaving some wiggle room for case-by-case > > evaluation as needed. That makes it different from prior attempts that > > did not provide clear guidance for future RFC authors. > > > > The specific guidelines offered may or may not appeal to you; those are > > open to discussion (within reason; we don't want to end up back in "do > > whatever" land as we know that won't help), but the more important > > point is that clear guidelines are provided. > > > > Also of note, although it uses existing code to demonstrate where > > classes *would* go under this plan it does not immediately move > > anything. Those are left for future RFCs that would have to stand or > > fall on their own merit. It also provides for a very long grace period > > for any such transitions to minimize disruption. > > > > The intent is to bring this proposal to a vote in time for 8.0's freeze > > one way or another, even though it's unlikely to have any impact on 8.0 > > itself. It's still a convenient deadline. > > > > *dons flame retardant suit* > > > > -- > > Larry Garfield > > larry@garfieldtech.com > > This has reached the 2 week mark, but there's not been much discussion. > Anyone else want to weigh in? > > I want to give it a few more days and possibly revise it to include a Wiki > page as suggested, but probably will bring it to a vote within the next > week or so. > Hey Larry, As far as I can see, this RFC still doesn't address a primary concern from previous discussions: Extensions may get moved between PHP and PECL. The only discussion of this issue seems to be this bullet point: > If a feature is removed from PHP-SRC (either to PECL or dropped entirely) its previously claimed component namespace remains reserved. It MAY be released by a subsequent RFC, following the standard RFC procedure, at least one minor version after the feature is removed. That delay is to minimize backward compatibility impact and allow userland code to migrate if appropriate. To reiterate what the problem is: If the "PHP" namespace is only used by extensions bundled with php-src, then any time we import an extension from PECL, that means all the symbols in that extension must get renamed. This is disruptive to any existing users of the extension, who now have to deal with different symbol names depending on which PHP version they use. Similarly, when extensions get unbundled and moved to PECL, my current reading of your RFC is that the extension would initially retain the PHP\ namespace prefix, even though it is no longer vendored by PHP, but the extension namespace may get reused at a later point in time (which seems counter-productive to the goal of avoiding naming collisions). For me, dealing with PHP <-> PECL moves is an important part of adopting namespaces in php-src, and I don't think the current proposal addresses this issue sufficiently. (One way to address it would be to drop the PHP\ prefix, and use unvendored namespace names for php-src.) Regards, Nikita --0000000000009d0cae05aa127d38--