Last modified: 2008-03-21 23:27:46 UTC
Per user complaint on #mediawiki. It appears that "namespace" is a reserved word on some versions of PHP 5 (even though it should not yet be). In any case, it will officially be at some point, so the use of the class named "Namespace" needs to be changed, as this causes "unexpected T_NAMESPACE" errors when Namespace.php is loaded on those versions of PHP. Rather than attach a large patch to do this, which may get out of date, here's some code to make the needed change from "Namespace" to MWNamespace": mv includes/Namespace.php includes/MWNamespace.php find . \( -name "*.php" -o -name "*.inc" \) -exec grep -l Namespace {} \; | \ xargs perl -pi -e 's/\bNamespace(\.php|::)/MWNamespace$1/' Obviously, I'm not going to commit such a large change without discussion, hence this bug.
The needed change don't fix the bug when using php6.0.0.
This is now clearly reproducible when running PHP 5.3 s the namespace patch has been merged.
r32309, r32310 replace Namespace with MWNamespace class in trunk (for 1.13). A compat 'Namespace' class is retained for compatibility with unchanged extensions when running on PHP < 5.3.