-
-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Request to deprecate ExtensionRegistry->load
#47
Conversation
Thanks! Guess we'll have to use queue() + loadFromQueue() ourselves. |
Alternatively we could require users to explicitly enable Lingo themselves.
I would prefer this solution (other SMW related extension behave
similar) over pulling in `ExtensionRegistry` dependencies.
I would suggest you set (in Lingo, the version is automatically
retrieved from `extension.json` so no extra work during the release
process):
```
public static function initExtension( $credits = [] ) {
$version = 'UNKNOWN' ;
// See https://phabricator.wikimedia.org/T151136
if ( isset( $credits['version'] ) ) {
$version = $credits['version'];
}
define( 'LINGO_VERSION', $version );
```
and check the availability of `LINGO_VERSION` in SG (see also [0]) via:
"ExtensionFunctions": [
"SemanticGlossary::onExtensionFunction"
],
Using `onExtensionFunction` ensures that `ExtensionRegistry` has
loaded all extensions to be registered (`callback` is to early for
that) so you can confidently check for `defined( 'LINGO_VERSION' )`
and if necessary, compare the version to a specific lower bound.
[0] https://github.com/SemanticMediaWiki/SemanticApprovedRevs/blob/master/SemanticApprovedRevs.php#L58-L91
Cheers
…On 4/24/19, Stephan Gambke ***@***.***> wrote:
Thanks!
Guess we'll have to use queue() + loadFromQueue() ourselves.
Alternatively we could require users to explicitly enable Lingo themselves.
--
You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub:
#47 (comment)
|
SG is now failing for MW 1.34+ as reported on MediaWiki.org |
Interestingly SG master was not failing for me on MW 1.34. However SG 3.0.0 is failing on MW 1.35 with the following fatal issued twice:
Stack trace:
|
I'm not sure how to address the failures. This one is confusing:
|
Ah... That one is saying it needs 7.1. 7.2 is confusing, though.
I imagine that is a problem with phpunit or php-mocks, but I don't know what to do. |
pinging @JeroenDeDauw in case he has a clue. |
Error hints at missing boolean return type. Perhaps the issue is too old PHPUnit for newer PHP version? Seen some of that in various places in recent history. Can just upgrade PHPUnit in that case |
Looks like it needs phpunit 5+ |
pull #47 Also, add editorconfig for MW style.
@@ -37,6 +37,9 @@ | |||
"mediawiki/semantic-media-wiki": "^2.4|^3.0", | |||
"mediawiki/lingo": "^2.0.3|^3.0" | |||
}, | |||
"require-dev": { | |||
"phpunit/phpunit": "^6.5" | |||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure what this is good for
Since we got relevant approval I just merged. A field test showed that the fatal for MW 1.35 is resolved. However I am not sure if the extension is still working as expected. This may be a separate issue. |
I found this issue following the extension talks where SemanticGlossary was labeled "Broken" with 1.34. Also googling the above mentioned error led me here, I'm producing it with a rather fresh installation of MediaWiki 1.35 and SemanticMediaWiki 3.2.2:
This is my environment (when disabling wfLoadExtension('SemanticGlossary') everything works fine): https://wiki.waldmonitoring.ch/index.php/Spezial:Version I hope this is the right place to mention this... The full error code is:
|
Did you try using the latest from git (e.g. "dev-master" in composer.local.json)? |
Thank you for answering. I tried, but that didn't fix it.
Then deinstalled both (Lingo via composer and SemanticGlossary manually) and added: Again this removes the dependency error and leaves the wiki functional, but with a similar php-error displayed on top (this time line 89 instead of 76):
The dependency error displayed when Lingo is NOT manually installed/loaded reads:
and gives advice about adding |
In the meantime a new issue was created #56 |
Thanks for pointing it out. So MW 1.35+ is "officially" not supported yet.
or should I rather wait until 1.35+ is supported? |
That's a good way of putting it. I hope that a withe night shows up to make this happen to allow users of MW 1.31 an upgrade path. Until then it does not make sense to have it on MW 1.35 I cannot remember why I de-installed this extension on sandbox for a second time however I once got it working on MW 1.35 but it did not show tooltips at all. |
Setup and configuration
Issue
https://gerrit.wikimedia.org/r/#/c/mediawiki/core/+/504032/
SemanticGlossary/SemanticGlossary.php
Lines 25 to 30 in 02ed40c