Page MenuHomePhabricator

PageAssessments has Invalid composer.json
Closed, ResolvedPublic

Description

$ composer validate
./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.

I think we should fix these issues so you can at least specify the extension manually.

It should specify a name as mediawiki/page-assessments and a type as mediawiki-extension,

Event Timeline

Change 365541 had a related patch set uploaded (by Rosalieper; owner: Rosalieper):
[mediawiki/extensions/PageAssessments@master] Invalid composer.json in PageAssessments extension

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

It should specify a name as mediawiki/page-assessments and a type as mediawiki-extension,

Name should be "PageAssessments"
Type should be "parserhook"

In accordance with how other extensions do this.

It should specify a name as mediawiki/page-assessments and a type as mediawiki-extension,

Name should be "PageAssessments"
Type should be "parserhook"

In accordance with how other extensions do this.

I'm talking about the name in composer.json I looked at other extensions at that was the format for the type which is always mediawiki/extension-name and the type is always mediawiki-extension per Composer Installers

It should specify a name as mediawiki/page-assessments and a type as mediawiki-extension,

Name should be "PageAssessments"
Type should be "parserhook"

In accordance with how other extensions do this.

I'm talking about the name in composer.json I looked at other extensions at that was the format for the type which is always mediawiki/extension-name and the type is always mediawiki-extension per Composer Installers

My bad. I was looking at extension.json instead. You're right.

The premise here is invalid, it validates just fine if you provide the --no-check-publish option. Adding those fields just make it publishable on packagist, which is not something that's recommended.

The premise here is invalid, it validates just fine if you provide the --no-check-publish option. Adding those fields just make it publishable on packagist, which is not something that's recommended.

I mean at a minimum I think the name and type should be correct so the extension can be installed with composer, the other fields are not important, but a licensee and description is helpful.

I mean at a minimum I think the name and type should be correct so the extension can be installed with composer, the other fields are not important, but a licensee and description is helpful.

Installing extensions via composer isn't recommended (I did just say that...). How exactly is it helpful? I think that duplicating the license and description (hardcoded English in fact) isn't helpful. It's clearly confusing given T167329#3444750.

Change 365541 merged by jenkins-bot:
[mediawiki/extensions/PageAssessments@master] Invalid composer.json in PageAssessments extension

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

Installing extensions via composer isn't recommended (I did just say that...). How exactly is it helpful? I think that duplicating the license and description (hardcoded English in fact) isn't helpful. It's clearly confusing given T167329#3444750.

I though you were saying publishing to packagist was not recommendend, not that installing an extension via composer is not recommended (which does not require the extension to be on Packagist).

There is a larger discussion on T166956 I really think Composer support should be available but completely optional .

I'm fine leaving out the description and a license as that does not prevent installation with composer. An invalid name and type does.

I created T170897: Setup a Composer Repository (Packagist) for MediaWiki Extensions as an alternative way to resolve the issue without modifying this extension's repository.

Change 372802 had a related patch set uploaded (by Rosalieper; owner: Rosalieper):
[mediawiki/extensions/PageAssessments@master] PageAssessments has Invalid composer.json

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

Change 372802 merged by jenkins-bot:
[mediawiki/extensions/PageAssessments@master] PageAssessments has Invalid composer.json

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