Page MenuHomePhabricator

Stop using composer class autoloading for "DataTypes" extension
Closed, InvalidPublic

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:
wikidata/build-resources : masterExplicitly load DataTypes extension
mediawiki/extensions/DataTypes : masterUse MediaWiki autoloader, and do not autoload the legacy entry point
operations/mediawiki-config : masterLoad DataTypes extension

Related Objects

StatusAssignedTask
ResolvedAddshore
ResolvedAddshore
ResolvedAddshore
ResolvedAddshore
ResolvedAddshore
ResolvedWMDE-leszek
ResolvedAddshore
ResolvedLegoktm
ResolvedAddshore
ResolvedAddshore
ResolvedAddshore
ResolvedAddshore
ResolvedLegoktm
ResolvedAddshore
ResolvedLegoktm
ResolvedAddshore
ResolvedLegoktm
ResolvedWMDE-leszek
ResolvedAddshore
Resolveddaniel
InvalidAddshore
ResolvedWMDE-leszek
InvalidNone
InvalidWMDE-leszek

Event Timeline

Addshore created this task.Nov 8 2017, 6:40 PM
Legoktm added a subscriber: Legoktm.Nov 9 2017, 2:40 AM

This appears to be the case ever since rEDTY4304177f6584: Migrate to extension.json schema, but we need to stop autoloading the legacy PHP entry point.

we need to stop autoloading the legacy PHP entry point.

As in in WMF production?

Change 390231 had a related patch set uploaded (by WMDE-leszek; owner: WMDE-leszek):
[mediawiki/extensions/DataTypes@master] Use MediaWiki autoloader, and do not autoload the legacy entry point

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

Not sure if I did it right, I guess autoloading test classes with composer is still fine?

Not sure if I did it right, I guess autoloading test classes with composer is still fine?

Hmm, probably not, otherwise tests loaded automatically by mediawiki that need those classes loaded wont have them loaded and will fail :/

Change 390337 had a related patch set uploaded (by WMDE-leszek; owner: WMDE-leszek):
[wikidata/build-resources@master] Explicitly load DataTypes extension

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

Change 391029 had a related patch set uploaded (by WMDE-leszek; owner: WMDE-leszek):
[operations/mediawiki-config@master] Load DataTypes extension

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

@WMDE-leszek this is now invalid as DataTypes will no longer be an extension and the composer lib can keep the autoloading.

WMDE-leszek closed this task as Invalid.Nov 14 2017, 12:44 PM

Change 391029 abandoned by WMDE-leszek:
Load DataTypes extension

Reason:
DataTypes changed to be a regular PHP library. No longer an extension.

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

Change 390231 abandoned by WMDE-leszek:
Use MediaWiki autoloader, and do not autoload the legacy entry point

Reason:
DataTypes changed to be a regular PHP library. No longer an extension.

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

Change 390337 abandoned by Addshore:
Explicitly load DataTypes extension

Reason:
Build is dead

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