Re: Namespaces in Core
| From: | Derick Rethans | Date: | Tue, 07 Feb 2017 11:05:03 +0000 |
| Subject: | Re: Namespaces in Core | ||
| References: | 1 2 3 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-98241@lists.php.net to get a copy of this message | ||
On Mon, 6 Feb 2017, Stanislav Malyshev wrote:
> > I'm strongly against use of the PHP namespace as a blanket namespace
> > for bundled PHP extensions. The PHP namespace should be used only
> > for functionality that is actually in some way related to PHP. For
> > example, the php-ast extension could reasonably be namespaced as
> > php\ast, as it provides an AST for PHP specifically. Similarly the
> > tokenizer extension could reasonably be namespaced as php\tokenizer.
>
> Agree. If we ever need namespace for mongodb extension, it should be
> mongodb (choose capitalization to your liking), not php\mongodb - php\
> should be things that are really php core or specifically deal with
> aspects of php as a language - tokenizer, syntax, etc.
It already has the MongoDB namespace btw:
http://php.net/manual/en/book.mongodb.php
And I would say that I would not agree with that namespace changing
to (nothing) *if* it would be part of the PHP core distribution, instead
I would choose for it to not be part of the core PHP distribution to
avoid breaking BC.
cheers,
Derick
--
https://derickrethans.nl | https://xdebug.org | https://dram.io
Like Xdebug? Consider a donation: https://xdebug.org/donate.php
twitter: @derickr and @xdebug