I would recommend not to update the composer himself, but let the tracy handle it. (automatically updated every 30/60 days)
I can also recommend using a new container infrastructure to speed up execution and enable caching ...
language: php sudo: false cache: directories: - $HOME/.composer/cache php: - 5.5 - 5.6 - 7 - hhvm install: - composer install script: vendor/bin/phpunit
The sudo: false statement indicates the use of containers. The cache: statement cache: ensures that the composer is cached correctly.
If you really want to cache the composer binary:
language: php php: - 5.5 - 5.6 - 7 - hhvm cache: directories: - $HOME/.composer/cache install: - travis_retry composer self-update && composer
As well as heads-up, if you are testing HHVM and you need to set the date-time, see https://github.com/travis-ci/travis-ci/issues/2523 . My way to solve this is to add the .ini file in my test directory with the date-time and install it in the correct folder for all testers. This is added to install: -step:
- mkdir -p /home/travis/.phpenv/versions/$(phpenv version-name)/etc/conf.d - phpenv config-add test/phpconfig.ini
In any case, a little more information than you requested, but I hope this helps someone to look for a composer / travis / material :)
source share