Make it possible to install extensions using Composer
authorjeroendedauw <jeroendedauw@gmail.com>
Thu, 31 Oct 2013 23:37:10 +0000 (00:37 +0100)
committerjeroendedauw <jeroendedauw@gmail.com>
Fri, 1 Nov 2013 13:37:29 +0000 (14:37 +0100)
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 [new file with mode: 0644]
composer.json [deleted file]

diff --git a/composer-example.json b/composer-example.json
new file mode 100644 (file)
index 0000000..6c4d37f
--- /dev/null
@@ -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 (file)
index ded3365..0000000
+++ /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": "*"
-       }
-}