On 25/06/14 07:30, Bryan Davis wrote:
I suggested MediaWiki\Extensions\OAuth because it
seems like the most
natural naming to me. PSR-4 [2] is very opinionated about namespaces.
It requires a top-level (or vendor) namespace. I chose "MediaWiki"
because ... MediaWiki. Beyond that sub-namespaces are optional, but
the file system path from the base directory to the php file must
match. Assuming that $IP is the base directory led me to suggest
MediaWiki\Extensions\OAuth.
I think it's fine.
In some cases, the vendor will be the extension name, which I think is
fine also. For example, Packagist has a "wikibase" vendor and a
"data-values" vendor, both created by Jeroen/WMDE, and they do already
use Wikibase and DataValues respectively as their root namespaces, in
accordance with their Packagist vendor names.
Along the same lines, one can also imagine a phpBB integration plugin
for MediaWiki being phpBB\MediaWiki rather than
MediaWiki\Extensions\phpBB.
-- Tim Starling