language: php

php:
# - 5.3 # requires old distro, see below
# - 5.4 # requires old distro, see below
# - 5.5 # requires old distro, see below
  - 5.6
  - 7.0
  - 7.1
  - 7.2
  - 7.3
# - hhvm # requires legacy phpunit & ignore errors, see below

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

matrix:
  include:
    - php: 5.3
      dist: precise
    - php: 5.4
      dist: trusty
    - php: 5.5
      dist: trusty
    - php: hhvm
      install: composer require phpunit/phpunit:^5 --dev --no-interaction
  allow_failures:
    - php: hhvm

sudo: false

addons:
  apt:
    packages:
      - libevent-dev # Used by 'event' and 'libevent' PHP extensions

cache:
  directories:
    - $HOME/.composer/cache/files

before_install:
  - sudo add-apt-repository ppa:ondrej/php -y
  - sudo apt-get update -q
  - sudo apt-get install libuv1-dev || true

install:
  - ./travis-init.sh
  - composer install

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

language: php

php:
# - 5.3 # requires old distro, see below
# - 5.4 # requires old distro, see below
# - 5.5 # requires old distro, see below
  - 5.6
  - 7.0
  - 7.1
  - 7.2
  - 7.3
# - hhvm # requires legacy phpunit & ignore errors, see below

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

matrix:
  include:
    - php: 5.3
      dist: precise
      before_install: [] # skip libuv
    - php: 5.4
      dist: trusty
      before_install: [] # skip libuv
    - php: 5.5
      dist: trusty
      before_install: [] # skip libuv
    - php: hhvm
      install: composer require phpunit/phpunit:^5 --dev --no-interaction
      before_install: [] # skip libuv
  allow_failures:
    - php: hhvm

sudo: false

addons:
  apt:
    packages:
      - libevent-dev # Used by 'event' and 'libevent' PHP extensions

cache:
  directories:
    - $HOME/.composer/cache/files

before_install:
  - sudo add-apt-repository ppa:ondrej/php -y
  - sudo apt-get update -q
  - sudo apt-get install libuv1-dev

install:
  - ./travis-init.sh
  - composer install

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

Fix Travis CI builds, do not install libuv on legacy PHP setups
Fix Travis CI builds, do not install libuv on legacy PHP setups