Hi there, I'm the primary developer of the VIKI <https://www.mediawiki.org/wiki/Extension:VIKI> extension and its two companion extensions, VikiSemanticTitle <https://www.mediawiki.org/wiki/Extension:VikiSemanticTitle> and VikiTitleIcon <https://www.mediawiki.org/wiki/Extension:VikiTitleIcon>.
I thought I'd take a look at converting these three extensions to the new extension registration <https://www.mediawiki.org/wiki/Manual:Extension_registration> format, but I ran into a problem. According to the documentation, the new extension registration does not support PHP constants <https://www.mediawiki.org/wiki/Manual:Extension_registration/Limitations>. I use a PHP constant to declare an explicit dependency on VIKI for VikiSemanticTitle and VikiTitleIcon. In my VIKI.php file, I declare: *define( 'VIKIJS_VERSION', '1.3');* And then in VikiSemanticTitle and VikiTitleIcon, I have a check that looks something like: *if( !defined( 'VIKIJS_VERSION' ) ) {* * die('Error: The extension VikiSemanticTitle requires VIKI to be installed first.');* *}* (As an aside, I also happen to use VIKIJS_VERSION as my version number, which I increment as I release new versions. But that's not as important.) Because the new extension registration format doesn't support PHP constants, this no longer works, and I can't run VikiSemanticTitle and VikiTitleIcon alongside VIKI - the VIKIJS_VERSION constant is seemingly no longer defined, so any page load dies with the error message above. If I can't use PHP constants anymore, does anyone have a better recommendation for declaring explicit dependencies? Or should I just avoid migrating the VIKI extensions to the new registration format? Thanks, -- Jason Ji jason.y...@gmail.com _______________________________________________ Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l