language: php

php:
# - 5.3 # requires old distro, see below
  - 5.4
  - 5.5
  - 5.6
  - 7
  - hhvm # ignore errors, see below

# lock distro so new future defaults will not break the build
dist: trusty

matrix:
  include:
    - php: 5.3
      dist: precise
  allow_failures:
    - php: hhvm

sudo: false

install:
  - COMPOSER_ROOT_VERSION=`git describe --abbrev=0` composer install --no-interaction

script:
  - ./vendor/bin/phpunit --coverage-text

language: php

php:
# - 5.3 # requires old distro, see below
  - 5.4
  - 5.5
  - 5.6
  - 7
  - hhvm # ignore errors, see below

# lock distro so new future defaults will not break the build
dist: trusty

matrix:
  include:
    - php: 5.3
      dist: precise
  include:
    - os: osx
      language: generic
      php: 7.0 # just to look right on travis
      env:
        - PACKAGE: php70
  allow_failures:
    - php: hhvm

sudo: false

install:
  # OSX install inspired by https://github.com/kiler129/TravisCI-OSX-PHP
  - |
    if [[ "${TRAVIS_OS_NAME}" == "osx" ]]; then 
      brew tap homebrew/homebrew-php 
      echo "Installing PHP ..."
      brew install "${PACKAGE}"
      brew install "${PACKAGE}"-xdebug
      brew link "${PACKAGE}"
      echo "Installing composer ..."
      curl -s http://getcomposer.org/installer | php
      mv composer.phar /usr/local/bin/composer
    fi
  - COMPOSER_ROOT_VERSION=`git describe --abbrev=0` composer install --no-interaction

script:
  - ./vendor/bin/phpunit --coverage-text

Test Mac OS X on Travis
Test Mac OS X on Travis

Squashed by @clue, originally from reactphp/socket#124