Page MenuHomePhabricator

Stop using composer class autoloading for "Wikibase" extension
Closed, ResolvedPublic

Description

In order to load this extension as a 'regular' extension in terms of the WMF deployment system the autoloader can not be generated by composer after cloning the git repo.
The class auto loading must be provided as part of the code contained in the git repo.

This could:

  1. Be a committed version of the composer generator autoloader in a different location?
  2. Be a list generated by the mediawiki core autoloader generating maint script?
  3. Be something else

Interesting task to note is T99865: Extension registration should support using a PSR-4 autoloader but that is not done yet!

Details

Related Gerrit Patches:
mediawiki/extensions/Wikibase : masterUse MediaWiki autoloader

Event Timeline

Addshore created this task.Nov 8 2017, 6:41 PM

Given the amount of classes involved, I guess having a list generated by script (having it fired pre-commit would be nice), or more clunky having a manually-maintained list but including some kind of test making sure all is there, would be nice in this case.
I am going to give this a stab, but as I am travelling I might not be able to do it in the next days, so please others feel free to go ahead and it better and faster!

Echo/Flow/CirrusSearch all have scripts that dump the autoload mapping, probably copying one of those should work.

Should we treat client/repo/lib as 3 separate extensions and have 3 different autoloaders?

Should we treat client/repo/lib as 3 separate extensions and have 3 different autoloaders?

Yes, probably

Change 391034 had a related patch set uploaded (by WMDE-leszek; owner: WMDE-leszek):
[mediawiki/extensions/Wikibase@master] Use MediaWiki autoloader

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

Change 391034 merged by jenkins-bot:
[mediawiki/extensions/Wikibase@master] Use MediaWiki autoloader

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

Addshore closed this task as Resolved.Nov 14 2017, 4:01 PM
Addshore claimed this task.
Restricted Application added a project: User-Addshore. · View Herald TranscriptNov 14 2017, 4:01 PM