[04:13:15] legoktm: what's the nice way to register one hook or another in an extension depending on core settings? [04:13:31] extension.json/callback and Hooks::register? [04:14:14] it feels like the callback function should receive some kind of configuration object which it can update [07:07:21] tgr: register both and check the core setting inside the functions [07:09:16] that seems wasteful [07:09:37] are the extension settings caches somewhere? [07:09:57] I need to vary the hooks on a flag that's fairly static [07:14:42] yeah, they're cached [07:15:24] there's no way for extensions to run code at that time (yet) [07:17:51] is the cache only reset when code changes? [07:18:22] I would be fine with having to touch extension.json any time the flag changes [07:18:30] it's for internal development use [07:19:27] LocalSettings.php will call wfLoadExtension( 'FooBar' ); (or wfLoadSkin), adding the extension to the load queue. At the beginning of Setup.php, the load queue will be read, and the cache (APCu) will be checked to see if we can use it. If there is a cache miss, each extension.json file will be read individually, and the result will be combined into a single array. The array is then cached as one, so future reads will just need to read one key [07:19:27] for any number of extensions. The cache is based on the modified time of all the individual files plus their file paths. [07:19:33] (from https://www.mediawiki.org/wiki/Manual:Extension_registration/Architecture) [20:16:44] legoktm, https://gerrit.wikimedia.org/r/#/c/140445/10..11/api/ApiTemplateData.php [20:17:03] hello [20:17:10] short array syntax version has a jenkins failure [20:17:22] 19:23:51 72 | ERROR | Call-time pass-by-reference calls are prohibited [20:17:22] 19:23:51 | | (Generic.Functions.CallTimePassByReference.NotAllowed) [20:17:27] is that known? [20:17:44] yes, you need to update codesniffer to 0.6.0 [20:18:47] 0.5.x is broken in that case, 0.6.0 has a workaround (disabled buggy sniff), and it's been fixed upstream, I'm waiting on them to do another release and then I'll release 0.7.0