We probably should consider prefixing TLD classes (like SPL Iterators and such) with a \ just to be compatible with namespacing down the road.
On May 17, 2012, at 3:13 AM, Niklas Laxström wrote: > On 17 May 2012 01:36, Jeroen De Dauw <[email protected]> wrote: >> Hey, >> >> I am not aware of any guidelines regarding the usage of PHP namespaces in >> MediaWiki and di not find any on MediaWiki.org. Not surprising since 1.20 >> is the first release in which we can actually use it. So I'm curious on >> peoples thoughts on how to use this new features, if at all, in core and in >> extensions. As far as I get it, we cannot simply put it into core without >> breaking compat all over he place, but could gradually introduce it for new >> components. For new extensions it's a lot easier of course, which happens >> to be the use case I'm currently facing, and wondering what to best do. >> MediaWiki\ExtensionName seems like a reasonable NS for extension classes. > > I just came across to a reference to PSR-0 while researching another > unrelated thing. > Little bit of googling gives this: https://gist.github.com/1234504 > > Seems to be somewhat relevant to this discussion, although pretty much > incompatible with what we do in MediaWiki currently. > -Niklas > > -- > Niklas Laxström > > _______________________________________________ > Wikitech-l mailing list > [email protected] > https://lists.wikimedia.org/mailman/listinfo/wikitech-l _______________________________________________ Wikitech-l mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/wikitech-l
