Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision |
development:recommended_tools:composer [2016/01/07 17:35] – created demiankatz | development:recommended_tools:composer [2020/09/22 14:22] (current) – demiankatz |
---|
| |
[[http://getcomposer.org|Composer]] is a popular solution for managing PHP dependencies -- it automates the installation and integration of third-party libraries into VuFind. | [[http://getcomposer.org|Composer]] is a popular solution for managing PHP dependencies -- it automates the installation and integration of third-party libraries into VuFind. |
| |
| ===== Installation ===== |
| |
| You can obtain Composer (and read full documentation) at [[http://getcomposer.org]]. |
| |
===== Usage ===== | ===== Usage ===== |
composer install | composer install |
| |
===== Working with Composer ===== | ===== Notes ===== |
| |
| ==== Composer Merge Plugin ==== |
| |
| Starting with VuFind 6.1, VuFind uses the [[https://github.com/wikimedia/composer-merge-plugin|Wikimedia Composer Merge Plugin]] to help developers add dependencies to local VuFind instances more easily. If you want to add a new dependency to a local instance of VuFind without having to override the existing composer.json/composer.lock (which can cause merge conflicts in the future), you can instead create a composer.local.json (based on the provided [[https://github.com/vufind-org/vufind/blob/dev/composer.local.json.dist|composer.local.json.dist]] example) and then run "composer update" to add everything. See [[https://github.com/vufind-org/vufind/pull/1425|pull request #1425]] for more details. |
| |
| ==== GitHub API Limits ==== |
| |
For more details on how Composer works and what else you can do with it, see its [[http://getcomposer.org|online documentation]]. | As of this writing, VuFind's default dependencies are largely fetched from [[https://packagist.org/|Packagist]] and should not be subject to any particular limits. However, if you add dependencies that are fetched directly from GitHub (or if VuFind's dependencies change in the future), Composer may occasionally complain about GitHub API rate limits while fetching information -- especially if you are using an automated deployment system that installs VuFind many times. To get around this problem, it may be necessary to set up an OAuth token. See [[https://github.com/composer/composer/blob/dev/doc/articles/troubleshooting.md#api-rate-limit-and-oauth-tokens|this page]] for more details. |
---- struct data ---- | ---- struct data ---- |
| properties.Page Owner : |
---- | ---- |
| |