### Problem
It is difficult to manage a MediaWiki project with composer. While you can edit the `composer.local.json` you cannot use the [[ https://getcomposer.org/doc/03-cli.md | Composer CLI ]]. Users should be able to customize the root `composer.json` file however they would like.
### Example
From the mediawiki root, execute:
```
composer require pear/mail
```
which is one of the [[ https://phabricator.wikimedia.org/source/mediawiki/browse/master/composer.json;fc3300e36ddffa6418ea987ca5e5e44b40353d5e$76 | suggested dependencies ]].
doing a `git status` will reveal that you've now modified the `composer.json` in the root. It's now more difficult to upgrade MediaWiki because you'll have to merge these changes with whatever comes from upstream.
### Solution
# {T167038}
# Create a `composer.json` file within `/core` with most of the dependencies. ([[ https://github.com/drupal/drupal/blob/8.4.x/core/composer.json | Example ]])
# Merge the `/core/composer.json` with the root. ([[ https://github.com/drupal/drupal/blob/8.4.x/composer.json | Example ]])
Doing this would not affect current packaging workflows. It would allow packaging to continue as normal.
### Features
In addition to solving the problem, it also enables:
# People can do a `composer create-project mediawiki/mediawiki` to setup a new project ("This is the equivalent of doing a git clone/svn checkout followed by a `composer install` of the vendors"). Within their project, `mediawiki/core` would be pulled in as a dependency in their `/vendor`, excluded from version control. The root `composer.json` and `composer.lock` can be tracked in their version control since the user will have their own Git repo and `/core` will be updated with composer.
# Allow extensions and skins to be downloaded with the [[ https://getcomposer.org/doc/03-cli.md | Composer CLI ]], e.g. using `composer require mediawiki/vector-skin`