From 31871b201a04dc25cfbc9cfa56834fefc1fe4054 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20L=C3=BCck?= Date: Fri, 28 Sep 2018 19:19:30 +0200 Subject: [PATCH 1/2] Add test instructions and support PHPUnit 6 and PHPUnit 5 --- .travis.yml | 2 +- README.md | 15 +++++++++++++++ composer.json | 2 +- phpunit.xml.dist | 2 +- tests/TrivialGraphFormatTest.php | 3 ++- tests/bootstrap.php | 13 ------------- 6 files changed, 20 insertions(+), 17 deletions(-) delete mode 100644 tests/bootstrap.php diff --git a/.travis.yml b/.travis.yml index 6cc3dcd..fecf3ce 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,4 +8,4 @@ php: install: - composer install --prefer-source --no-interaction script: - - php vendor/bin/phpunit --coverage-text + - vendor/bin/phpunit --coverage-text diff --git a/README.md b/README.md index fbadbe2..f2525da 100644 --- a/README.md +++ b/README.md @@ -16,6 +16,21 @@ The recommended way to install this library is [through composer](http://getcomp } ``` +## Tests + +To run the test suite, you first need to clone this repo and then install all +dependencies [through Composer](https://getcomposer.org): + +```bash +$ composer install +``` + +To run the test suite, go to the project root and run: + +```bash +$ php vendor/bin/phpunit +``` + ## License Released under the terms of the permissive [MIT license](http://opensource.org/licenses/MIT). diff --git a/composer.json b/composer.json index 04b061c..d094e51 100644 --- a/composer.json +++ b/composer.json @@ -15,7 +15,7 @@ "clue/graph": "~0.9.0|~0.8.0" }, "require-dev": { - "phpunit/phpunit": "~4.0" + "phpunit/phpunit": "^6.4 || ^5.7 || ^4.8.35" }, "autoload": { "psr-4": {"Graphp\\TrivialGraphFormat\\": "src/"} diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 488fbca..976fa80 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -1,6 +1,6 @@ - Date: Fri, 28 Sep 2018 19:25:30 +0200 Subject: [PATCH 2/2] Support legacy PHP 5.3 through PHP 7.2 and HHVM --- .travis.yml | 28 +++++++++++++++++++++++----- README.md | 5 +++++ 2 files changed, 28 insertions(+), 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index fecf3ce..30be35b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,11 +1,29 @@ language: php + php: - - 5.6 - - 5.5 +# - 5.3 # requires old distro, see below - 5.4 - - 5.3 - - hhvm + - 5.5 + - 5.6 + - 7.0 + - 7.1 + - 7.2 + - hhvm # ignore errors, see below + +# lock distro so future defaults will not break the build +dist: trusty + +matrix: + include: + - php: 5.3 + dist: precise + allow_failures: + - php: hhvm + +sudo: false + install: - - composer install --prefer-source --no-interaction + - composer install --no-interaction + script: - vendor/bin/phpunit --coverage-text diff --git a/README.md b/README.md index f2525da..f873cf2 100644 --- a/README.md +++ b/README.md @@ -16,6 +16,11 @@ The recommended way to install this library is [through composer](http://getcomp } ``` +This project aims to run on any platform and thus does not require any PHP +extensions and supports running on legacy PHP 5.3 through current PHP 7+ and +HHVM. +It's *highly recommended to use PHP 7+* for this project. + ## Tests To run the test suite, you first need to clone this repo and then install all