From d6e69d774d613e3097d7b1640540b62ec89d2685 Mon Sep 17 00:00:00 2001 From: jeroendedauw Date: Fri, 1 Nov 2013 00:37:10 +0100 Subject: [PATCH] Make it possible to install extensions using Composer With this change it is possible for users to create a composer.json file in which they list the extensions they want to have installed and then install them via Composer. They can copy composer-example.json to get started. Before this change there was an actual composer.json file tracked by git, so people would get a change tracked by git if they modified it. Surprisingly this is all that is needed to get extension installation to work, for the extensions that already support it. Kudos to hashar and others that already did the other required work. With this change core no longer pretends to be a component that is installable via composer. This never worked, and core will need to be modified in several ways before this can work. In other words, no working functionality is lost, and quite a lot is gained. Example usage: * Copy composer-example.json to composer.json. * Run "composer require diff/diff 0.9" * Hit Special:Version and be happy Change-Id: Ib125bea00cd29a800c22f260e87dfe3327a0b618 --- composer-example.json | 11 +++++++++++ composer.json | 30 ------------------------------ 2 files changed, 11 insertions(+), 30 deletions(-) create mode 100644 composer-example.json delete mode 100644 composer.json diff --git a/composer-example.json b/composer-example.json new file mode 100644 index 0000000000..6c4d37f5dc --- /dev/null +++ b/composer-example.json @@ -0,0 +1,11 @@ +{ + "require": { + "php": ">=5.3.2" + }, + "suggest": { + "ext-fileinfo": "*", + "ext-mbstring": "*", + "ext-wikidiff2": "*", + "ext-apc": "*" + } +} diff --git a/composer.json b/composer.json deleted file mode 100644 index ded3365261..0000000000 --- a/composer.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "name": "mediawiki/core", - "description": "Free software wiki application developed by the Wikimedia Foundation and others", - "keywords": ["mediawiki", "wiki"], - "homepage": "https://www.mediawiki.org/", - "authors": [ - { - "name": "MediaWiki Community", - "homepage": "https://www.mediawiki.org/wiki/Special:Version/Credits" - } - ], - "license": "GPL-2.0", - "support": { - "issues": "https://bugzilla.wikimedia.org/", - "irc": "irc://irc.freenode.net/mediawiki", - "wiki": "https://www.mediawiki.org/" - }, - "require": { - "php": ">=5.3.2" - }, - "require-dev": { - "phpunit/phpunit": "*" - }, - "suggest": { - "ext-fileinfo": "*", - "ext-mbstring": "*", - "ext-wikidiff2": "*", - "ext-apc": "*" - } -} -- 2.20.1