I’d like to have the following in LocalSettings.php
:
wfLoadExtension('MyExt');
$egMyExtMode = MYEXT_MODE_A;
Before extension schema this could be archived by using define()
in the “setup file” (the one used in require_once
). But now, even callback
in extension.json
is being evaluated after LocalSettings.php
time and therefore using the constant within LocalSettings.php
will fail as it is still undefined.
I did not find a nice example for something like this (e.g. FlaggedRevs defines constants but does not use extension.json
)
Note: I do not want to define namespace constants, which can easily be done using extension.json/namespaces
.