How to enable PHP redis extension on Travis

I run Travis CI to run my tests. I am using Trusty container with php v5.6.

Here is my entire .travis.yml file:

language: php dist: trusty php: - '5.4' before_script: - phpenv config-rm xdebug.ini - before_script: echo "extension = redis.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini sudo: required install: - npm install -g gulp - composer install env: - APP_ENV=circleci script: - gulp test 

The before_script: syntax before_script: copied directly from the travis documentation , but my assemblies do not work with a composer error:

 - The requested PHP extension ext-redis * is missing from your system. Install or enable PHP redis extension. 
+7
php continuous-integration phpredis travis-ci
source share
1 answer

This documentation seems to be wrong! Instead of before_script: it should be before_install: This seems to work fine:

 # before_script: before_install: - phpenv config-rm xdebug.ini - before_script: echo "extension = redis.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini 
0
source share

All Articles