On Sun, Dec 8, 2013 at 2:20 PM, Tyler Romeo <tylerro...@gmail.com> wrote:
> On Sat, Dec 7, 2013 at 8:09 AM, Jeroen De Dauw <jeroended...@gmail.com>wrote:
>
>> Present situation:
>>
>> * By default nothing is installed
>> * Users can choose whatever they want to add, _including_ PHPUnit
>>
>
> This is forgetting the point that is the topic of this thread: you cannot
> currently add dependencies for the MediaWiki core itself because
> there is no composer.json file to add them to. If I wanted to add a
> third party library as a dependency to MediaWiki core, how would I do
>  it? (Keep in mind I'm not talking in the scope of my own installation, > I 
> mean adding a dependency to core itself through Gerrit.)
>
> Right now the only somewhat proper approach to adding new core
> dependencies is using Git submodules, which is not the most
> favorable approach for reasons I mentioned in the beginning of the
> thread.

I've been thinking about this problem on and off for a while. I think
that one of the issues that is being bumped into with using Composer
in core is that core is both a library (or really collection of
libraries) and an application.

I believe that the composer.json file was taken out of core to make it
easier for consumers of MW the application to use composer to manage
extensions in their local install via composer. This supports Joroen's
use case of allowing folks running a MW instance to manage their
extensions using Composer.

The side effect is that it removed the ability to use Composer to
manage external components used by MW the library which is Tyler's
proposed use case [0].

I have used Composer with both applications [1] and libraries [2], but
I've never tried to make a single project serve both roles. Finding a
way to separate MW the library from MW the application may be a
solution to this conflict. I don't think this would be a trivial
project, but it doesn't seem impossible either. There would be several
installation use cases to work through for a successful conversion:
Foundation wiki farm, developer installs, consumer install via
packagist, consumer install via tarball, etc.

[0]: https://www.mediawiki.org/wiki/Requests_for_comment/Third-party_components
[1]: https://git.wikimedia.org/summary/wikimedia%2Fwikimania-scholarships
[2]: https://packagist.org/users/bd808/

Bryan
-- 
Bryan Davis              Wikimedia Foundation    <bd...@wikimedia.org>
[[m:User:BDavis_(WMF)]]  Sr Software Engineer                Boise, ID
irc: bd808                                        v:415.839.6885 x6855

_______________________________________________
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

Reply via email to