language: php
php:
  - "5.4"
  - "5.5"
  - "5.6"
env:
  - SYMFONY_VERSION="~2.3.0"
  - SYMFONY_VERSION="~2.7.0"
before_script:
  - if [[ $TRAVIS_PHP_VERSION =~ 5.[34] ]] ; then echo 'extension="apc.so"' >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini; fi;
  - if [[ $TRAVIS_PHP_VERSION =~ 5.[56] ]] ; then echo yes | pecl install apcu-4.0.10; fi;
  - if [[ $TRAVIS_PHP_VERSION = 7.* ]] ; then echo yes | pecl install apcu; fi;
  - if [[ $TRAVIS_PHP_VERSION =~ 5.[34] ]] ; then echo 'extension="apc.so"' >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini; fi;
  - if [[ $TRAVIS_PHP_VERSION != 'hhvm' ]]; then echo "apc.enable_cli = 1" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini; fi;
  - composer require symfony/dependency-injection:${SYMFONY_VERSION} symfony/config:${SYMFONY_VERSION}
  - composer install --dev

language: php
php:
  - "5.4"
  - "5.5"
  - "5.6"
env:
  - SYMFONY_VERSION="~2.3.0"
  - SYMFONY_VERSION="~2.7.0"
before_script:
  - if [[ $TRAVIS_PHP_VERSION =~ 5.[34] ]] ; then echo 'extension="apc.so"' >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini; fi;
  - if [[ $TRAVIS_PHP_VERSION =~ 5.[56] ]] ; then echo yes | pecl install apcu-4.0.10; fi;
  - if [[ $TRAVIS_PHP_VERSION = 7.* ]] ; then echo yes | pecl install apcu; fi;
  - if [[ $TRAVIS_PHP_VERSION =~ 5.[34] ]] ; then echo 'extension="apc.so"' >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini; fi;
  - if [[ $TRAVIS_PHP_VERSION != 'hhvm' ]]; then echo "apc.enable_cli = 1" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini; fi;
  - composer require symfony/dependency-injection:${SYMFONY_VERSION} symfony/config:${SYMFONY_VERSION}
  - composer install --dev
script:
  - vendor/bin/phpunit

Fix Travis for PHP 5.4.
Fix Travis for PHP 5.4.

The container used by Travis for PHP 5.4 has problems with PHPUnit. You can use the one installed by composer instead.
