From 4fa9429172ef8c17ce76bbc9ef065bfcf34f97f1 Mon Sep 17 00:00:00 2001 From: TangRufus Date: Fri, 13 Mar 2020 11:26:26 +0000 Subject: [PATCH 1/5] Bump minimum PHP requirement from 5.6 to 7.1 - Bump minimum PHP requirement from 5.6 to 7.1 (inline with [Bedrock](https://github.com/roots/bedrock/blob/ff5e28ac74f1e9aac1b44f8d197054a34eb85079/composer.json#L33)) - Add PHP 7.3 and 7.4 to test matrix - Update dependencies See: https://github.com/roots/wp-config/issues/4 --- .travis.yml | 4 ++-- Makefile | 4 ++-- README.md | 6 +++--- composer.json | 10 +++++----- tests/ConfigTest.php | 3 ++- 5 files changed, 14 insertions(+), 13 deletions(-) diff --git a/.travis.yml b/.travis.yml index 13cd8da..a2004dc 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,9 +1,9 @@ language: php php: +- '7.4' +- '7.3' - '7.2' - '7.1' -- '7.0' -- '5.6' - nightly install: make travis-install diff --git a/Makefile b/Makefile index 751879f..55732ac 100644 --- a/Makefile +++ b/Makefile @@ -18,10 +18,10 @@ vendor: composer.lock ${MAKE} install test: vendor - ${DRUN} php:5.6 ${PHPUNIT} - ${DRUN} php:7.0 ${PHPUNIT} ${DRUN} php:7.1 ${PHPUNIT} ${DRUN} php:7.2 ${PHPUNIT} + ${DRUN} php:7.3 ${PHPUNIT} + ${DRUN} php:7.4 ${PHPUNIT} ${DRUN} php:7 ${PHPUNIT} test-fast: vendor diff --git a/README.md b/README.md index 7094f2f..fbcf48f 100644 --- a/README.md +++ b/README.md @@ -28,12 +28,12 @@ echo WP_DEBUG_DISPLAY; Just run `make` to do everything -We use PHPUnit 5 because it has compatibility for PHP 5.6 +We use PHPUnit 7 because it has compatibility for PHP 7.1 -[PHPUnit Docs](https://phpunit.de/manual/5.7/en/index.html) +[PHPUnit Docs](https://phpunit.readthedocs.io/en/7.5/) There are 3 test commands -- `make test` run the full test suite from php 5.6 to 7.x +- `make test` run the full test suite from php to 7.1 to 7.4 - `make test-fast` run php 7 tests - `make test-coverage` generate an html test coverage report in `./coverage` diff --git a/composer.json b/composer.json index 73ebb05..c9be27a 100644 --- a/composer.json +++ b/composer.json @@ -15,17 +15,17 @@ } }, "require": { - "php": ">=5.6" + "php": "^7.1" }, "require-dev": { - "squizlabs/php_codesniffer": "^3.3", + "squizlabs/php_codesniffer": "^3.5", "roave/security-advisories": "dev-master", - "phpunit/phpunit": "^5.7", - "php-coveralls/php-coveralls": "^2.1" + "phpunit/phpunit": "^7.5", + "php-coveralls/php-coveralls": "^2.2" }, "config": { "platform": { - "php": "5.6" + "php": "7.1" } } } diff --git a/tests/ConfigTest.php b/tests/ConfigTest.php index 80cb724..e190a04 100644 --- a/tests/ConfigTest.php +++ b/tests/ConfigTest.php @@ -2,13 +2,14 @@ namespace Roots\WPConfig; +use PHPUnit\Framework\TestCase; use Roots\WPConfig\Exceptions\ConstantAlreadyDefinedException; use Roots\WPConfig\Exceptions\UndefinedConfigKeyException; /** * @runTestsInSeparateProcesses */ -class ConfigTest extends \PHPUnit_Framework_TestCase +class ConfigTest extends TestCase { public function testDefineHappy() { From e7ff8fb21efe859830d0f6ec5cb40e41a7f6cf9d Mon Sep 17 00:00:00 2001 From: Tang Rufus Date: Fri, 13 Mar 2020 14:07:08 +0000 Subject: [PATCH 2/5] Ease PHP requirement to `>=7.1` https://github.com/roots/wp-config/pull/7#discussion_r392242522 Co-Authored-By: Austin Pray --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index c9be27a..6318e0f 100644 --- a/composer.json +++ b/composer.json @@ -15,7 +15,7 @@ } }, "require": { - "php": "^7.1" + "php": ">=7.1" }, "require-dev": { "squizlabs/php_codesniffer": "^3.5", From 5620627a6a403beb2f997a8dc6a4ce2bb7a6ff6e Mon Sep 17 00:00:00 2001 From: TangRufus Date: Fri, 13 Mar 2020 14:10:27 +0000 Subject: [PATCH 3/5] Composer: Remove platform https://github.com/roots/wp-config/pull/7#discussion_r392243325 --- composer.json | 5 ----- 1 file changed, 5 deletions(-) diff --git a/composer.json b/composer.json index 6318e0f..72d2551 100644 --- a/composer.json +++ b/composer.json @@ -22,10 +22,5 @@ "roave/security-advisories": "dev-master", "phpunit/phpunit": "^7.5", "php-coveralls/php-coveralls": "^2.2" - }, - "config": { - "platform": { - "php": "7.1" - } } } From 8a4ffc6721956d220ed233ac1cc05bedf7114d6d Mon Sep 17 00:00:00 2001 From: Austin Pray Date: Fri, 13 Mar 2020 09:17:10 -0500 Subject: [PATCH 4/5] attempt to allow nightly failures --- .travis.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.travis.yml b/.travis.yml index a2004dc..15626bb 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,6 +11,8 @@ install: make travis-install script: make travis-test jobs: + allow_failures: + - php: nightly include: - stage: "Follow Up" name: "Test Coverage" From 8430f4ea643631a4904c5e9385554bf0ff8ea93a Mon Sep 17 00:00:00 2001 From: TangRufus Date: Fri, 13 Mar 2020 14:19:04 +0000 Subject: [PATCH 5/5] TravisCI: Run `Test Coverage` and `Code Style` on PHP 7.1 --- .travis.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.travis.yml b/.travis.yml index 15626bb..61d284e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -16,6 +16,8 @@ jobs: include: - stage: "Follow Up" name: "Test Coverage" + php: '7.1' script: travis_retry make travis-coverage - name: "Code Style" + php: '7.1' script: make travis-phpcs