[18:44:21] A curiosity with extension registration, docs say for the default merge strategy of array_merge "When at least one of the global value and the default is not an array, the merge strategy is ignored and the global value will simply override the default." But the implementation is "If the global is not set, or is an empty array, replace it entirely." (direct quote from code comment). Which [18:44:23] is correct? [18:45:09] in practice, we have a value that defaults to null, we set it to empty array, and the wiki still sees null. I can of course switch it to provide_default and my problem is fixed, but i wonder if either the docs or the registration needs a fix? [19:11:51] ebernhardson: ah, I take it null and empty array behave differently for this setting? That's probably not something we recognise today, or if we do, it's very easy to accidentally regress as a bug, given that isset() doesn't distinguish between a variable not existing or it being set to null. [19:12:44] There's a few other cases as well, like if you don't declare $wgFoo anywhere, but run `$wgFoo`, then that variable now exists in the local scope as implicit null. Even if it didn't exist before that point. [19:13:35] ref: docs https://www.mediawiki.org/wiki/Manual:Extension.json/Schema, implementation: https://gerrit.wikimedia.org/g/mediawiki/core/+/9a2d0dde196f490968576ef169126f46b34a7ed3/includes/registration/ExtensionRegistry.php#487 [19:20:00] Krinkle: yes, in this case null means autodetect, and empty array means you want this to be empty. I suppose we could split it and have autodetect be it's own value [19:29:28] ebernhardson: right, we often use `false` for that in MediaWiki core. [19:31:28] To answer your question, I don't know that one is more correct than the other "correct". Personally, I'd say it should be safe to make it so that any non-null value will replace the default. That's how it would have been before the days of extension.json if they were all globals.