Le 19/07/13 22:28, Tyler Romeo a écrit :
From what Antoine found out from the composer people, basically what we'll have to do to make MW use Composer is that we need to separate the entry points from the backend classes (in other words, put everything except index.php, api.php, etc. in one repository, and then have the entry points in another). That way the MW core itself becomes a library, which is how Symfony does it. Then people just make a project from the entry point project, and then they can use "composer require" to add more extensions.
Exactly :-]
And installing yoursite would be something like:
mkdir mysite cd mysite composer require mediawiki/core composer require wikibase/wikibase # which installs data-values/data-values ask/ask as well
Your root directory ends up with a composer.json:
{ "require": { "mediawiki/core": "*", "diff/diff": "*", "wikibase/wikibase": "*" } }
And a vendor directory containing all dependencies. At the root of your directory you would write some glue maybe looking like:
<?php require('vendor/autoload.php'); require('vendor/mediawiki/core/index.php');
(that does not work, but you get the idea).