Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:109925 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 11107 invoked from network); 29 Apr 2020 15:29:51 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 29 Apr 2020 15:29:51 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 00BC81804D0 for ; Wed, 29 Apr 2020 07:03:18 -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=-1.1 required=5.0 tests=BAYES_00,SPF_HELO_PASS, SPF_NEUTRAL autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS30827 82.113.144.0/21 X-Spam-Virus: No X-Envelope-From: Received: from xdebug.org (xdebug.org [82.113.146.227]) by php-smtp4.php.net (Postfix) with ESMTP for ; Wed, 29 Apr 2020 07:03:16 -0700 (PDT) Received: from localhost (localhost [IPv6:::1]) by xdebug.org (Postfix) with ESMTPS id 40B7510C063; Wed, 29 Apr 2020 15:03:15 +0100 (BST) Date: Wed, 29 Apr 2020 15:03:15 +0100 (BST) X-X-Sender: derick@singlemalt.home.derickrethans.nl To: Nikita Popov cc: =?UTF-8?Q?C=C3=B4me_Chilliet?= , PHP internals In-Reply-To: Message-ID: References: <4063585.LhOdPkFbeG@mcmic-probook> <3884830.k3x24Gr3VI@mcmic-probook> User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="8323329-771252323-1588168995=:3061" Subject: Re: [PHP-DEV] Renaming PhpAttribute to Attribute From: derick@php.net (Derick Rethans) --8323329-771252323-1588168995=:3061 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: QUOTED-PRINTABLE On Wed, 29 Apr 2020, Nikita Popov wrote: > On Wed, Apr 29, 2020 at 3:24 PM C=C3=B4me Chilliet < > come.chilliet@fusiondirectory.org> wrote: >=20 > > Le mercredi 29 avril 2020, 14:58:02 CEST Nikita Popov a =C3=A9crit : > > > On Wed, Apr 29, 2020 at 2:51 PM C=C3=B4me Chilliet < > > > come.chilliet@fusiondirectory.org> wrote: > > > > Le mardi 28 avril 2020, 18:59:22 CEST Benas IML a =C3=A9crit : > > > > > > > > > Could you provide any examples as to where '\Attribute' is=20 > > > > > being used in the wild? I haven't seen a single project that=20 > > > > > has an Attribute class and uses the global namespace. > > > > > > > > We do use an Attribute class in FusionDirectory: > > > > https://gitlab.fusiondirectory.org/fusiondirectory/fd/-/blob/1.4-de= v/include/simpleplugin/class_Attribute.inc > > > > > > > > I=E2=80=99d expect a lot of projects to have an Attribute class, si= nce=20 > > > > there are things named attributes in lots of contexts. > > > > > > Great! You have discovered a nice opportunity to finally move your=20 > > > code into the FusionDirectory namespace. > > > > > > PHP reserves (de facto if not de jure) the global namespace for=20 > > > it's own purposes. If you want to place classes in the global=20 > > > namespace, without prefixing them, that's fine, but please don't=20 > > > complain if there are clashes. > > > > This is a bit harsh, I did not complain, I provided an example of=20 > > project to someone who wrote =C2=ABCould you provide any examples=C2=BB= =2E I=20 > > can, so I did. >=20 > Sorry for the snark! >=20 > To rephrase my mail in a more neutral fashion: I don't think we should=20 > be taking potential naming clashes *in the global namespace* into=20 > account at all, independently of whether we know that specific clashes=20 > exist or not. This is also documented already in the manual: https://www.php.net/manual/en/userlandnaming.rules.php "PHP owns the top-level namespace but tries to find decent descriptive=20 names and avoid any obvious clashes." cheers, Derick --=20 PHP 7.4 Release Manager Host of PHP Internals News: https://phpinternals.news Like Xdebug? Consider supporting me: https://xdebug.org/support https://derickrethans.nl | https://xdebug.org | https://dram.io twitter: @derickr and @xdebug --8323329-771252323-1588168995=:3061--