Page MenuHomePhabricator

Convert WikibaseRepository, WikibaseClient, WikibaseLib and WikibaseView to use extension registration
Open, NormalPublic

Description

As a wikibase developer I want wikibase to use extensions registration so that I can make easy use of new mediawiki features such as PSR4 autoloading T182943.
As a WMDE employee I want wikibase to use the same extension registration system as other WMDE maintained extensions so that I only need to know about 1 system.
As the WMF I want wikibase to use extension registration so that all extensions are consistent T87875

Details

More details are available on T87875.
Also see the docs on https://www.mediawiki.org/wiki/Manual:Extension_registration

All 4 extension entry points in the Wikibase git repo need to be converted.
That is:

Impact & priority

Per T87875#4464905 Wikibase is one of the final 7 extensions to be converted that are deployed to the WMF cluster.
This many not be actively blocking anything critical, but this ticket has been open since 2015 and moving forward with it will require commitment by the Wikibase teams due to the complexity of the entry points and configuration.

Task

Convert all listed entry points to use extension registration.

Acceptance criteria

  • Wikibase can still be loaded using the .php entry points using backwards compatible stubs
  • All entry points listed above (4) are converted

Related Objects

Event Timeline

There are a very large number of changes, so older changes are hidden. Show Older Changes

One roadblock which we want to remove in the long run, but not in this step is that we have extensions (WikibaseClient and WikibaseClient) in extensions (Wikibase the git repo that has the former two in it) in extensions (Wikidata the build result after running composer). We should be able to work around that by calling wfLoadExtension with a path in the build. I'll see if I find anything else while reviewing these patches, working on T100813 and changing the Wikidata build to work with it.

JanZerebecki removed JanZerebecki as the assignee of this task.Jun 26 2015, 10:42 AM

BTW, when to do same thing for WikibaseQuality, WikibaseQualityConstraints and WikibaseQualityExternalValidation, should I list these 3 here, or file another task?

Those should probably be on another task.

Liuxinyu970226 added a comment.EditedJul 17 2015, 12:15 AM

Those should probably be on another task.

OK thx, see T106104

Liuxinyu970226 renamed this task from Convert Wikibase* to use extension registration to Convert WikibaseClient, WikibaseLib and WikibaseRepository to use extension registration.Jul 17 2015, 12:15 AM

Change 229119 had a related patch set uploaded (by Paladox):
Wikibase: Convet Wikibase lib, client, repo to extension.json, empty php entry point

https://gerrit.wikimedia.org/r/229119

Change 211384 abandoned by Paladox:
Wikibase Repo: Add extension.json, empty PHP entry point

https://gerrit.wikimedia.org/r/211384

Change 211391 abandoned by Paladox:
Wikibase Lib: Add extension.json, empty PHP entry point

https://gerrit.wikimedia.org/r/211391

Change 211393 abandoned by Paladox:
Wikibase Client: Add extension.json, empty PHP entry point

https://gerrit.wikimedia.org/r/211393

what's the status of this?

Jonas renamed this task from Convert WikibaseClient, WikibaseLib and WikibaseRepository to use extension registration to [Task] Convert WikibaseClient, WikibaseLib and WikibaseRepository to use extension registration.Aug 13 2015, 3:17 PM

Change 229119 abandoned by Reedy:
[BREAKING CHANGE] Wikibase: Convet lib, client, repo to extension.json, empty php entry point

https://gerrit.wikimedia.org/r/229119

WMDE-leszek moved this task from Backlog to In Progress on the Wikidata-Sprint-2017-12-20 board.
Sumit removed a subscriber: Sumit.Apr 13 2018, 4:15 PM
Addshore removed the point value for this task.Jul 2 2018, 5:27 PM
Addshore added a subscriber: Addshore.

Removing the story point as I can't see when it was actually added and I don't believe it is comparable to our current story points

Addshore renamed this task from [Task] Convert WikibaseClient, WikibaseLib and WikibaseRepository to use extension registration to Convert WikibaseClient, WikibaseLib and WikibaseRepository to use extension registration.Jul 31 2018, 11:46 AM
Addshore removed WMDE-leszek as the assignee of this task.
Addshore added a subscriber: WMDE-leszek.
Addshore updated the task description. (Show Details)
Addshore moved this task from Unsorted to Migrate / Replace on the Technical-Debt board.
Addshore added a project: Story.
Addshore moved this task from To Evaluate to Ready on the wikidata-tech-focus board.

Another potentially related task semi-blocked on this one: T188717

hashar added a subscriber: hashar.Sep 4 2018, 10:32 AM
Lucas_Werkmeister_WMDE renamed this task from Convert WikibaseClient, WikibaseLib and WikibaseRepository to use extension registration to Convert WikibaseRepository, WikibaseClient, WikibaseLib and WikibaseView to use extension registration.Apr 16 2019, 11:26 AM
Lucas_Werkmeister_WMDE updated the task description. (Show Details)

T87985: Convert Translate to use extension registration has an interesting proposal for how to do the migration: instead of trying to convert the whole file at once, which results in a huge patch that’s hard to review and grows stale quickly, start with an empty extension-wip.json file, load that from the PHP entrypoint, and then start moving parts of the extension registration from PHP to JSON one by one, until the PHP file is just the wfLoadExtension() call and extension-wip.json can be renamed to a proper extension.json. It looks like that approach was pretty successful for the Translate extension, so I think we should follow it here as well.

That sounds like a great idea :)

Removing this form the campsite, until it has gone through the exploration we are currently doing

Addshore moved this task from Incoming to Needs Work on the Wikidata-Campsite board.

Needs a breakdown for each thing we are going to move.
Will do this soon.

awight added a subscriber: awight.Jul 16 2019, 12:00 PM

T87985: Convert Translate to use extension registration has an interesting proposal for how to do the migration: instead of trying to convert the whole file at once, which results in a huge patch that’s hard to review and grows stale quickly, start with an empty extension-wip.json file...

+1, this approach was relatively painless for the Translate extension, and has been validated by successful, incremental deployment.