Skip to content
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

Adaption for new extension loading mechanism #3

Closed
ghost opened this issue Mar 30, 2016 · 10 comments
Closed

Adaption for new extension loading mechanism #3

ghost opened this issue Mar 30, 2016 · 10 comments

Comments

@ghost
Copy link

ghost commented Mar 30, 2016

I just adapted your code to reflect the new loading mechanism for Mediawiki extension. Shall I send you the code?

@kghbln
Copy link
Contributor

kghbln commented Mar 30, 2016

See also this talk. :) Perhaps it will be good to make a last version for the classic mechanism and move on with @Sigbert 's changes. I will do a pull request.

@kghbln kghbln mentioned this issue Mar 30, 2016
@Hutchy68
Copy link
Owner

Are we good with this issue. Except %$@* !!! I forgot to pull in @MATsxm PR for the update to fr.json. I'm going to commit that right now.

@kghbln
Copy link
Contributor

kghbln commented Mar 30, 2016

@Hutchy68 Well there was a French translation before so this is not so decisive. Will be part of the next release.
@Sigbert In case you are not so familiar with GitHub you could also send the code to me and I move it in for you, otherwise just to the pull.

@kghbln
Copy link
Contributor

kghbln commented Apr 1, 2016

I got the code from @Sigbert. Thanks a bunch. This one is however breaking. I am thinking of doing a backwards compatible interim version and move this on in after. Hopefully I will do it tomorrow. Disaster unfolded on a wiki yesterday so I was a bit busy.

@kghbln
Copy link
Contributor

kghbln commented Apr 22, 2016

@Sigbert I am sorry that it took me so long. After @Hutchy68 merged my pull request #6 I will move in your changes and make this extension breaking with pre MW 1.25 instances.

@Hutchy68
Copy link
Owner

Hutchy68 commented Nov 2, 2017

Hmm, unless I'm missing something. I don't see extension.json or the entry point for use of wfLoadExtension in PR #6. I would do this as a v2.0.0 and break compatibility with anything under 1.25.

Entry point would look something like this.

if ( function_exists( 'wfLoadExtension' ) ) {
  wfLoadExtension( 'Purge' );
  $wgMessagesDirs['Purge'] = __DIR__ . '/i18n';
  /* wfWarn(
    'Deprecated PHP entry point used for Purge extension.' .
    'Please use wfLoadExtension instead, ' .
    'see https://www.mediawiki.org/wiki/Extension_registration for more details.'
  ); */
  return;
} else {
  die( 'This version of the Purge extension requires MediaWiki 1.25+' );
}

Could also delete Purge.i18n.php as it is only a shim to load .json files so they appear as the old way of loading messages.

Thoughts?

@samwilson
Copy link
Contributor

Personally, I think breaking compatibility for out-of-date wikis is fine. They can always continue using an older version.

@kghbln
Copy link
Contributor

kghbln commented Nov 2, 2017

@Sigbert 's proposed changes never made it to here as a pull request since I was waiting for some release still compatible with 1.23 and afterwards make the breaking change for 1.25 and later. To much time has passed in the meantime. I know however that he had a version containing the "extension.json" file.

samwilson added a commit to samwilson/Purge that referenced this issue Nov 13, 2017
This change:
* adds extension.json (with backwards compatible loading from
  Purge.php);
* fixes a possible conflict with a message name;
* removes installation instructions etc. from README and points
  instead to the mediawiki.org page; and
* removes the global variables from the navigation links hook.

Bug: GH Hutchy68#3
@samwilson
Copy link
Contributor

I've created a PR for this: #19

Hutchy68 added a commit that referenced this issue Jun 11, 2020
* Add extension registration

This change:
* adds extension.json (with backwards compatible loading from
  Purge.php);
* fixes a possible conflict with a message name;
* removes installation instructions etc. from README and points
  instead to the mediawiki.org page; and
* removes the global variables from the navigation links hook.

Bug: GH #3

* Some tweaks to @samwilson PR to prep for merge

* Bumps to version b/c will need MW 1.31+

* Manifest version back to 2 and requires MW >= 1.31.0

Co-authored-by: Sam Wilson <[email protected]>
@Hutchy68
Copy link
Owner

closing as it was merged

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants