How to enable PHP redis extension on Travis : <p>I'm running Travis CI for running my tests. I'm using the Trusty container with php v5.6.</p>

<p>Here is my entire .travis.yml file:</p>

<pre><code>language: php

dist: trusty

php:
  - '5.4'

before_script:
  - phpenv config-rm xdebug.ini
  - before_script: echo "extension = redis.so" &gt;&gt; ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini

sudo: required

install:
  - npm install -g gulp
  - composer install

env:
  - APP_ENV=circleci

script:
  - gulp test
</code></pre>

<p>The <code>before_script:</code> syntax is copied directly from <a href="https://docs.travis-ci.com/user/languages/php#Enabling-preinstalled-PHP-extensions">the travis documentation</a> but my builds fail with a composer error saying:</p>

<pre><code>- The requested PHP extension ext-redis * is missing from your system. Install or enable PHP's redis extension.
</code></pre>
