Re: Renaming PhpAttribute to Attribute
| From: | Côme Chilliet | Date: | Wed, 29 Apr 2020 13:23:47 +0000 |
| Subject: | Re: Renaming PhpAttribute to Attribute | ||
| References: | 1 2 3 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-109920@lists.php.net to get a copy of this message | ||
Le mercredi 29 avril 2020, 14:58:02 CEST Nikita Popov a écrit :
> On Wed, Apr 29, 2020 at 2:51 PM Côme Chilliet <
> come.chilliet@fusiondirectory.org> wrote:
> > Le mardi 28 avril 2020, 18:59:22 CEST Benas IML a écrit :
> > > Could you provide any examples as to where '\Attribute' is being used in
> > the
> > > wild? I haven't seen a single project that 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-dev/include/simpleplugin/class_Attribute.inc
> >
> > I’d expect a lot of projects to have an Attribute class, since there are
> > things named attributes in lots of contexts.
>
> Great! You have discovered a nice opportunity to finally move your code
> into the FusionDirectory namespace.
>
> PHP reserves (de facto if not de jure) the global namespace for it's own
> purposes. If you want to place classes in the global namespace, without
> prefixing them, that's fine, but please don't complain if there are clashes.
This is a bit harsh, I did not complain, I provided an example of project to someone who wrote
«Could you provide any examples».
I can, so I did.
--
Côme Chilliet
FusionDirectory - https://www.fusiondirectory.org