On Tue, 02 Jul 2013 09:30:57 -0700, Jeroen De Dauw jeroendedauw@gmail.com wrote:
- Installing extensions leaves the composer.json file modified.
When installing one or more extensions via Composer, they will get added to the require section in composer.json. composer.json is not in the gitignore list. So you might well run into conflicts here, and in any case will have a modified file that is tracked in your git repo, which is annoying. In case of extension installation via LocalSettings, this stuff is in a file that is in gitignore. We could just add composer.json there as well, but this means that when we make changes to it on master, people will not get them any time soon. This is problematic in case we where to make MW core dependent on other packages, though this seems unlikely to happen, and is thus perhaps just a theoretical concern. Does anyone see a way around this problem better than putting composer.json in gitignore? Any concerns with putting it in gitignore?
This is precisely one of the reasons I thought installing MW extensions via Composer was a stupid idea in the first place. Installing extensions should not require the file that MediaWiki declares it's library dependencies and information about itself to be modified.
Another one is extension assets. Have you dealt with the fact that MW doesn't have a proper path to serve the css/js in debug mode, images to IE, and other assets that an extension needs.
- Not clear how to best install an extension
The best command to use for installation of an extension when you already have MediaWiki seems to be "composer require", for instance "composer require ask/ask:dev-master". When using this command, apparently the require-dev packages are also installed. Since MW specifies PHPUnit in require-dev, it is installed, together with all of its dependencies (quite some code) for no good reason. In case of the require command, there appears to be no way to specify it should not get the dev packages.
An alternate approach to installation is to add the things to install manually in the require section of composer.json and do a "composer update --no-dev". This approach might be fine when doing a manual install, though it clearly does not work well when you want to automate it (ie in a CI build process).
Again, does anyone know of a better way to do such an install? And if not, perhaps we can simply get rid of the require-dev section in our composer.json file so we do not run into the problem its causing when using "composer require"?
No. One of the explicit changes was to support PHPUnit installed via composer instead of globally (which can be quite awkward to do sometimes). And I have a gerrit change in-waiting which has tests that use a library that's optionally installed via `composer install --dev`.
[0] http://getcomposer.org/ [1] https://www.mediawiki.org/wiki/Composer [2] https://gerrit.wikimedia.org/r/#/c/71616/
Cheers
-- Jeroen De Dauw http://www.bn2vs.com Don't panic. Don't be evil. ~=[,,_,,]:3 -- _______________________________________________ Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l