[14:32:14] I have a potentially stupid question about extension registration [14:32:41] with namespaces in extension.json, you can define a constant name for the namespace number, but that constant will only be defined when the extension registry processes all the queued extensions [14:33:04] so in LocalSettings.php, after wfLoadExtension(), e.g. NS_MODULE doesn’t exist yet [14:33:30] how do people do stuff with those namespaces in their LocalSettings.php, then? e.g. defining namespace aliases or whatever [14:33:53] do they just hard-code the namespace number? or manually define() the constant? [14:34:09] (I see that ExtensionRegistry allows for the constant to have been define()d already, and checks that it wasn’t set to a different value) [14:34:42] to me this seems like a disadvantage compared to the old extension system (where the PHP entry point could directly define the constants) – I just want to make sure I’m not missing something 😅 [14:38:49] https://phabricator.wikimedia.org/source/mediawiki-config/browse/master/wmf-config/InitialiseSettings.php$3308 looks like it [15:05:32] Lucas_WMDE: Yeah, unfortunately [15:05:41] alright, thanks [15:05:44] Or you do silly stuff like with $wgExtensionFunctions and set things in a callback [15:08:05] Yeah, it's particularly a problem in LoadSchemaUpdates() when your extension's constants won't have been created yet, but you want to do things with them. [15:10:18] I’m now doing something similar in Wikibase as ExtensionRegistry, i.e. allow the constants to have been defined earlier [15:10:25] (I can link the patch once Gerrit is back up) [15:11:10] https://gerrit.wikimedia.org/r/c/mediawiki/extensions/Wikibase/+/727366 [19:45:36] Lucas left, but https://phabricator.wikimedia.org/T247629 is the ticket discussing this [19:46:28] Not really opposed to figuring out some alternative but it really hasn't come up as a huge issue I feel [19:46:46] The main problem is that we only read extension.json after LocalSettings