Https://circleci.com/docs/composer-api-rate-limit page is inaccurate


#1

Documentation page above uses composer to download “source” packages via GIT which will “git clone” every dependency and also bypasses the composer local cache. This is highly inefficient and will potentially use a lot more bandwidth. Instead of doing that if you already include GITHUB_TOKEN in your environment you should do this:
composer config -g github-oauth.github.com

Per: https://github.com/composer/composer/issues/2366

To reduce the number of round trips per CI build you can even cache the “composer cache” folder. Composer stores it’s cache under the .composer folder in users home directory. This could potentially be changed to a place that Circle CI uses to preserve things across builds by setting COMPOSER_CACHE_DIR environment variable… What would happen then is that composer would just install the dependencies without having to go out to the internet to download them.

See documentation: https://getcomposer.org/doc/03-cli.md#composer-cache-dir


#2

Caching of composer dependencies mentions this as well. I would like to see existing documentation updated first. I guess some automation/setup on the feature side would help a lot as well.


#3