As part of our on-going `extension.json` experiment, `SemanticGlossary` has been converted to use it but I'm a bit unhappy about how it loads the required `Lingo` extension from within the callback and uses the `ExtensionRegistry` instance:
```
// must NOT use ExtensionRegistry::getInstance() to avoid recursion!
$registry = new ExtensionRegistry();
if ( file_exists( __DIR__ . '/extensions/Lingo/extension.json' ) ) {
$registry->load( __DIR__ . '/extensions/Lingo/extension.json' );
} else {
$registry->load( $GLOBALS[ 'wgExtensionDirectory' ] . '/Lingo/extension.json' );
}
```
Some advise on how to improve the situation would be much appreciated. SemanticFormsSelect [2] (not released yet with `extension.json`) currently enforces a `die( ... )` on the event that the required `PageForms` extension is not manually added to the `LocalSettings` which suboptimal [3].
[0] https://github.com/SemanticMediaWiki/SemanticGlossary/blob/master/SemanticGlossary.php#L22-L28
[1] https://github.com/SemanticMediaWiki/SemanticMediaWiki/pull/1732
[2] https://github.com/SemanticMediaWiki/SemanticFormsSelect/blob/master/extension.json
[3] https://github.com/SemanticMediaWiki/SemanticFormsSelect/issues/44#issuecomment-263418602