Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:110927 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 55436 invoked from network); 10 Jul 2020 18:14:40 -0000 Received: from unknown (HELO localhost.localdomain) (76.75.200.58) by pb1.pair.com with SMTP; 10 Jul 2020 18:14:40 -0000 To: internals@lists.php.net References: <0771c3ac-53ec-4a7f-a4e9-6ae3c9b1f1f6@www.fastmail.com> <49fd7972-8cec-4207-99af-6c77c2328211@www.fastmail.com> Date: Fri, 10 Jul 2020 18:06:08 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-GB Content-Transfer-Encoding: 7bit X-Posted-By: 87.81.129.66 Subject: Re: [PHP-DEV] [RFC] \PHP namespace usage heuristics From: marandall@php.net (Mark Randall) Message-ID: On 10/07/2020 09:54, Nikita Popov wrote: > 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.) There is another option that we reserve \Ext as well (not \PHP\Ext) \PHP stays for engine level classes (core, collections etc) \PHP\Annotations\JIT \PHP\Tokenizer\Token ... \Ext gets used for extensions, including bundled extensions. Anyone with good standing can request an \Ext (or could use one without requesting it, but it wouldn't be a BC break if an officially approved extension took its name). \Ext\Mysqli\Connection \Ext\Mysqli\Result \Ext\Gd\Image \Ext\Curl\Handle ... This would also solve the long-problem of an ever-increasing number of classes and symbols placed into the root namespace.