Updating Composer in Travis

If you're using Composer in Travis, it's a good idea to update Composer before each build. If you do not update, you may receive warnings like the following.

Warning: This development build of composer is over 30 days old. It is recommended to update it by running "/home/travis/.phpenv/versions/5.4.13/bin/composer.phar self-update" to get the latest version.

It seems the Travis environment isn't completely reset between builds and jobs. Tests should always be ran using the latest version of Composer, so place a selfupdate in before_script.

before_script:
  - composer selfupdate
  - composer install

No Comments

No discussion has generated around this article yet? Why not provide some opinionated dialogue!