Page MenuHomePhabricator

Valid composer.json for VisualEditor
Closed, DeclinedPublic

Description

Hello,

The composer.json for VisualEditor is not entirely valid:

./composer.json is valid for simple usage with composer but has
strict errors that make it unable to be published as a package:
See https://getcomposer.org/doc/04-schema.md for details on the schema
name : The property name is required
description : The property description is required
No license specified, it is recommended to do so. For closed-source software you may use "proprietary" as license.

This prevents the publishing of the extension on Packagist and makes it a lot less easy to install with Composer.
Here is an example of a valid composer.json file: https://git.wikimedia.org/blob/mediawiki%2Fextensions%2FLiquidThreads.git/master/composer.json

Regards,

Event Timeline

@Rudloff we use composer for tests not to publish on packagist.

Adding @Legoktm since I think you said no to do this for other extensions too.

We had a discussion on T123363 and we agreed that using Composer autoloading feature to install extension is probably not a good thing for MediaWiki but that downloading extensions with Composer is harmless.
I personnaly think that it would be pretty useful as Composer is becoming the defacto standard for installing third-party PHP code.

VisualEditor is intentionally not published on packagist.org. The composer.json is valid for what it's being used for.