Re: [RFC] \PHP namespace usage heuristics
| From: | Mark Randall | Date: | Fri, 10 Jul 2020 17:06:08 +0000 |
| Subject: | Re: [RFC] \PHP namespace usage heuristics | ||
| References: | 1 2 3 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-110927@lists.php.net to get a copy of this message | ||
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.