Page MenuHomePhabricator

Remove classmap-authoritative from composer.json
Closed, ResolvedPublic

Description

@JeroenDeDauw emailed me to ask about problems with local development of extensions related to the use of classmap-authoratative: true in the composer.json file of mediawiki/core.git. When an extension uses a boostrap.php file for testing that adds PSR0/4 autoloaders, classmap-authoratative: true will keep the PSR autoloader from being consulted.

The use of classmap-authoratative: true provides a measurable performance improvement for MediaWiki on the WMF production cluster, but that environment really uses the composer.json in the mediawiki/vendor.git repo and not the composer.json in mediawiki/core.git. Since this setting is merely performance enhancing and can be worked around for WMF and other large scale users, it seems reasonable to change the default behavior to be more friendly to development use.

Details

Related Gerrit Patches:

Event Timeline

bd808 created this task.Aug 2 2015, 2:07 AM
bd808 raised the priority of this task from to Medium.
bd808 updated the task description. (Show Details)
bd808 added subscribers: bd808, Legoktm, JeroenDeDauw.
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptAug 2 2015, 2:07 AM

Yeah, that makes sense. We should also look into adding a classmap-authoratative argument to composer dump-autoload upstream (as suggested in https://github.com/composer/composer/pull/3610#issuecomment-71929902) so people who are using composer in production can still get the same perf benefits.

Change 228598 had a related patch set uploaded (by BryanDavis):
Remove classmap-authoratative: true from composer.json

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

Change 228598 merged by jenkins-bot:
Remove classmap-authoratative: true from composer.json

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

Legoktm closed this task as Resolved.Aug 2 2015, 3:19 AM
Legoktm assigned this task to bd808.
Legoktm set Security to None.

Yeah, that makes sense. We should also look into adding a classmap-authoratative argument to composer dump-autoload upstream (as suggested in https://github.com/composer/composer/pull/3610#issuecomment-71929902) so people who are using composer in production can still get the same perf benefits.

Opened issue 4361 and pull 4362 upstream to add a cli argument for classmap-authoritative