From 85b13455ff4cabeb0be867e6bdc0de68bbe2b0ba Mon Sep 17 00:00:00 2001 From: Bernhard Breytenbach Date: Wed, 18 Apr 2018 07:47:06 +0200 Subject: [PATCH 1/8] Default to PHP versions under active development PHP 7.0 is no longer under active support, and PHP 5.5 has been End of Life since Jul 2016. This commit removes version 5.2 - 5.4, and allows failure on EoL 5.5. It also adds 7.1, 7.2, and nightly, in an attempt to promote newer versions of PHP. --- .travis.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.travis.yml b/.travis.yml index 3e9aa3b7..4df436c8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,18 +5,18 @@ language: php php: # using major version aliases - # aliased to 5.2.17 - - 5.2 - # aliased to 5.3.29 - - 5.3 - # aliased to a recent 5.4.x version - - 5.4 # aliased to a recent 5.5.x version - 5.5 # aliased to a recent 5.6.x version - 5.6 - # aliased to a recent 7.x version + # aliased to a recent 7.0.x version - 7.0 + # aliased to a recent 7.1.x version + - 7.1 + # aliased to a recent 7.2.x version + - 7.2 + # aliased to a recent nightly build + - nightly # aliased to a recent hhvm version - hhvm @@ -31,7 +31,7 @@ matrix: - php: hhvm env: DB=pgsql # PDO driver for pgsql is unsupported by HHVM (3rd party install for support) allow_failures: - - php: 7.0 + - php: 5.5 - php: hhvm # execute any number of scripts before the test run, custom env's are available as variables From 502e8a9a14d2def1dc25f8455527c7e04b940dc2 Mon Sep 17 00:00:00 2001 From: Bernhard Breytenbach Date: Wed, 18 Apr 2018 11:40:03 +0200 Subject: [PATCH 2/8] Fix PHPUnit namespace for PHP 7 and above --- Tests/HelloWorldTest.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Tests/HelloWorldTest.php b/Tests/HelloWorldTest.php index eaab7996..c5cb370d 100644 --- a/Tests/HelloWorldTest.php +++ b/Tests/HelloWorldTest.php @@ -1,6 +1,6 @@ assertEquals('Bar', $helloWorld->what()); } } - From 6277050d8b6afa6c4dc8876ec35d325e01726a8f Mon Sep 17 00:00:00 2001 From: Bernhard Breytenbach Date: Wed, 18 Apr 2018 11:57:31 +0200 Subject: [PATCH 3/8] Add fix for PHPUnit running on PHP 5.5 --- Tests/bootstrap.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Tests/bootstrap.php b/Tests/bootstrap.php index d1fe4e2b..c2de5fb5 100644 --- a/Tests/bootstrap.php +++ b/Tests/bootstrap.php @@ -2,6 +2,12 @@ function loader($class) { + // Support for pre-PHP 5.6 versions + if ($class === 'PHPUnit\Framework\TestCase') { + class_alias('PHPUnit_Framework_TestCase', '\PHPUnit\Framework\TestCase'); + + return; + } $file = $class . '.php'; if (file_exists($file)) { require $file; From 10e16a6f84ebb0b545379c4bd0b906343858e42c Mon Sep 17 00:00:00 2001 From: Code Sport I/O Date: Wed, 3 Jul 2019 03:45:20 -0400 Subject: [PATCH 4/8] updated travis SVG in Readme file --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index a3515555..c619435f 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ continuous integration with a PHP project. Here is a sample status icon showing the state of the master branch. -[![Build Status](https://travis-ci.org/travis-ci-examples/php.svg?branch=master)](https://travis-ci.org/travis-ci-examples/php) +[![Build Status](https://travis-ci.org/codesport/php-example.svg?branch=master)](https://travis-ci.org/codesport/php-example) In order to run this project just fork it on github.com and then [enable](http://about.travis-ci.org/docs/user/getting-started/) your fork on your [travis-ci profile](http://travis-ci.org/profile). Every push will then trigger a new build on Travis CI. From e472d1650d94b381a793344d47cf57f2777866d2 Mon Sep 17 00:00:00 2001 From: Code Sport I/O Date: Wed, 3 Jul 2019 04:11:59 -0400 Subject: [PATCH 5/8] commented out php verions 5.2 through 5.4 from travis.yml --- .travis.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 3e9aa3b7..9825227d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,11 +6,11 @@ php: # using major version aliases # aliased to 5.2.17 - - 5.2 + #- 5.2 # aliased to 5.3.29 - - 5.3 + #- 5.3 # aliased to a recent 5.4.x version - - 5.4 + #- 5.4 # aliased to a recent 5.5.x version - 5.5 # aliased to a recent 5.6.x version From 718643ce4492cf1ba308008b14c1e424c8ba14ac Mon Sep 17 00:00:00 2001 From: Code Sport I/O Date: Wed, 3 Jul 2019 04:39:43 -0400 Subject: [PATCH 6/8] Moved php versions 5.2 and 5.3 to "allow_failures" in travis.yml file. Updated links in ReadMe to point to correct travis SVG and profile. --- .travis.yml | 8 +++----- README.md | 2 +- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/.travis.yml b/.travis.yml index 9825227d..e14a5924 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,12 +5,8 @@ language: php php: # using major version aliases - # aliased to 5.2.17 - #- 5.2 - # aliased to 5.3.29 - #- 5.3 # aliased to a recent 5.4.x version - #- 5.4 + - 5.4 # aliased to a recent 5.5.x version - 5.5 # aliased to a recent 5.6.x version @@ -31,6 +27,8 @@ matrix: - php: hhvm env: DB=pgsql # PDO driver for pgsql is unsupported by HHVM (3rd party install for support) allow_failures: + - php: 5.2 + - php: 5.3 - php: 7.0 - php: hhvm diff --git a/README.md b/README.md index c619435f..e52aaf0d 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ continuous integration with a PHP project. Here is a sample status icon showing the state of the master branch. -[![Build Status](https://travis-ci.org/codesport/php-example.svg?branch=master)](https://travis-ci.org/codesport/php-example) +[![Build Status](https://travis-ci.org/travis-ci-examples/php-example.svg?branch=master)](https://travis-ci.org/travis-ci-examples/php-example) In order to run this project just fork it on github.com and then [enable](http://about.travis-ci.org/docs/user/getting-started/) your fork on your [travis-ci profile](http://travis-ci.org/profile). Every push will then trigger a new build on Travis CI. From 9ad5b7245cd7d2264eac9558c2949340fca0aa88 Mon Sep 17 00:00:00 2001 From: Code Sport I/O Date: Wed, 3 Jul 2019 12:52:33 -0400 Subject: [PATCH 7/8] Commented out/removed PHP versions 5.5 and 7.2 as well as nightly builds from build tests --- .travis.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 4df436c8..fcaa54e6 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,7 +6,7 @@ php: # using major version aliases # aliased to a recent 5.5.x version - - 5.5 + #- 5.5 # aliased to a recent 5.6.x version - 5.6 # aliased to a recent 7.0.x version @@ -14,9 +14,9 @@ php: # aliased to a recent 7.1.x version - 7.1 # aliased to a recent 7.2.x version - - 7.2 + #- 7.2 # aliased to a recent nightly build - - nightly + #- nightly # aliased to a recent hhvm version - hhvm @@ -31,7 +31,7 @@ matrix: - php: hhvm env: DB=pgsql # PDO driver for pgsql is unsupported by HHVM (3rd party install for support) allow_failures: - - php: 5.5 + - php: 7.1 - php: hhvm # execute any number of scripts before the test run, custom env's are available as variables From 8dbb3cb3209596bd6eeb237f5da2df0c492a9249 Mon Sep 17 00:00:00 2001 From: Code Sport I/O Date: Wed, 3 Jul 2019 12:57:06 -0400 Subject: [PATCH 8/8] Commented out/removed PHP versions 5.5 and 7.2 as well as nightly builds from build tests --- .travis.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index fcaa54e6..d90fd16b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,8 +5,6 @@ language: php php: # using major version aliases - # aliased to a recent 5.5.x version - #- 5.5 # aliased to a recent 5.6.x version - 5.6 # aliased to a recent 7.0.x version