Page MenuHomePhabricator

Add composer.json file to CommonsMetadata
Closed, DeclinedPublic

Description

Hello,

Would it be possible to add a valid composer.json to the CommonsMetadata repository so the extension can be easily installed with Composer?
Here is an example of what it could look like: https://git.wikimedia.org/blob/mediawiki%2Fextensions%2FLiquidThreads.git/master/composer.json

Regards,

Event Timeline

Rudloff created this task.May 21 2016, 3:44 PM
Restricted Application added subscribers: Zppix, Aklapper. · View Herald TranscriptMay 21 2016, 3:44 PM
Tgr added a subscriber: Tgr.May 21 2016, 4:35 PM

Do you want to submit a patch?

Change 290006 had a related patch set uploaded (by Aklapper):
Add composer.json file

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

Aklapper renamed this task from composer.json to Add composer.json file to CommonsMetadata.May 21 2016, 7:46 PM
Aklapper assigned this task to Rudloff.
Aklapper triaged this task as Medium priority.
Restricted Application added a subscriber: Steinsplitter. · View Herald TranscriptMay 21 2016, 7:46 PM
Aklapper added a subscriber: Danny_B.

@Danny_B: This is unrelated to Composer itself but about supporting Composer in CommonsMetadata. Hence removing that tag.

Change 290006 abandoned by Umherirrender:
Add composer.json file

Reason:
per T467

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

Umherirrender closed this task as Declined.Jan 1 2017, 5:06 PM
Umherirrender added a subscriber: Umherirrender.

per T467

T467 is about using Composer to load extensions, not about using Composer only to download extensions.
The proposed patch does not use Composer's autoloader and you still need to use wfLoadExtension() to load the extension. The patch only allows people to use Composer to download/update the extension (if they want to, this is entirely optional).

The description of this task ask for install support, not just for download. Install support is T467

But feel free to open this task.

@Legoktm: you have blocked some other patches for merging, can you have a look here? Thanks.

"install" in Composer context means downloading the PHP files. Again the proposed patch does not enable the extension with Composer.

Anyway, as some contributors clearly don't want Composer for extensions (which I still don't understand because it has no side effect when the composer.json does not enable autoload), I will stop proposing patches for composer.json files and I will keep using this workaround.

Tgr added a comment.Jan 3 2017, 1:23 AM

Won't we need composer.json as a CI endpoint anyway?

Won't we need composer.json as a CI endpoint anyway?

Yes, but this task is about install support in composer.json

Tgr added a comment.Jan 3 2017, 7:08 PM

Won't we need composer.json as a CI endpoint anyway?

Yes, but this task is about install support in composer.json

So the only change needed is to put composer/installers into a personal file instead of the extension's composer.json, right?