From 459b1278e4fec69fc88b7b7913e1df83eab928b0 Mon Sep 17 00:00:00 2001 From: Brett Stevenson Date: Mon, 4 Jan 2021 17:15:43 -0800 Subject: [PATCH 01/18] Troubleshoot CI build --- .travis.yml | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/.travis.yml b/.travis.yml index f65fbe4..d8071ea 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,6 +2,8 @@ sudo: required language: php +services: mysql + notifications: email: on_success: never @@ -9,8 +11,7 @@ notifications: php: - 5.4 - - 7.0 - - 7.1 + - 7.2 env: - WP_VERSION=latest WP_MULTISITE=0 @@ -21,16 +22,16 @@ matrix: env: WP_VERSION=4.4 WP_MULTISITE=0 - php: 5.4 env: WP_VERSION=latest WP_MULTISITE=1 + - php: 7.2 + env: WP_VERSION=latest WP_MULTISITE=1 before_script: - bash bin/install-wp-tests.sh wordpress_test root '' localhost $WP_VERSION - | - if [[ ${TRAVIS_PHP_VERSION:0:3} == "7.0" ]]; then - composer global require "phpunit/phpunit=6.*" - elif [[ ${TRAVIS_PHP_VERSION:0:2} == "7." ]]; then - composer global require "phpunit/phpunit=7.*" + if [[ ${TRAVIS_PHP_VERSION:0:3} == "7.2" ]]; then + composer global require "phpunit/phpunit=^7" else - composer global require "phpunit/phpunit=4.8.*" + composer global require "phpunit/phpunit=^4" fi - | - composer install @@ -52,4 +53,4 @@ deploy: script: sh bin/deploy.sh on: branch: master - php: 7.0 + php: 7.1 From d88897dd70fc81bd2eddd6cb0089e23ac0a4cf8e Mon Sep 17 00:00:00 2001 From: Brett Stevenson Date: Tue, 5 Jan 2021 10:06:05 -0800 Subject: [PATCH 02/18] Modify build to use Trusty environment --- .travis.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.travis.yml b/.travis.yml index d8071ea..fc77393 100644 --- a/.travis.yml +++ b/.travis.yml @@ -13,6 +13,8 @@ php: - 5.4 - 7.2 +dist: trusty + env: - WP_VERSION=latest WP_MULTISITE=0 From 6aa21f4210c387d9fce79ed6263b5717e0a1ac44 Mon Sep 17 00:00:00 2001 From: Brett Stevenson Date: Tue, 5 Jan 2021 11:59:00 -0800 Subject: [PATCH 03/18] Limit Trusty build environment to PHP v5.4 builds --- .travis.yml | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/.travis.yml b/.travis.yml index fc77393..8e1772c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -13,17 +13,18 @@ php: - 5.4 - 7.2 -dist: trusty - -env: - - WP_VERSION=latest WP_MULTISITE=0 - matrix: include: - php: 5.4 + # PHP v5.4 isn't supported in the default build environment + # Only use Trusty environment for v5.4 builds because it increases queue time + dist: trusty env: WP_VERSION=4.4 WP_MULTISITE=0 - php: 5.4 - env: WP_VERSION=latest WP_MULTISITE=1 + dist: trusty + env: WP_VERSION=4.4 WP_MULTISITE=1 + - php: 7.2 + env: WP_VERSION=latest WP_MULTISITE=0 - php: 7.2 env: WP_VERSION=latest WP_MULTISITE=1 From fd6ced49d3a76c0296b09c97ab0c0a9177b0e576 Mon Sep 17 00:00:00 2001 From: Brett Stevenson Date: Tue, 5 Jan 2021 11:59:48 -0800 Subject: [PATCH 04/18] Update PHP v7 version for phpunit compatibility --- .travis.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 8e1772c..0c04ef3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,7 +11,7 @@ notifications: php: - 5.4 - - 7.2 + - 7.4 matrix: include: @@ -23,15 +23,15 @@ matrix: - php: 5.4 dist: trusty env: WP_VERSION=4.4 WP_MULTISITE=1 - - php: 7.2 + - php: 7.4 env: WP_VERSION=latest WP_MULTISITE=0 - - php: 7.2 + - php: 7.4 env: WP_VERSION=latest WP_MULTISITE=1 before_script: - bash bin/install-wp-tests.sh wordpress_test root '' localhost $WP_VERSION - | - if [[ ${TRAVIS_PHP_VERSION:0:3} == "7.2" ]]; then + if [[ ${TRAVIS_PHP_VERSION:0:3} == "7.4" ]]; then composer global require "phpunit/phpunit=^7" else composer global require "phpunit/phpunit=^4" From 448509ba8a6bfebc767f94496dcceef74f0439cf Mon Sep 17 00:00:00 2001 From: Brett Stevenson Date: Tue, 5 Jan 2021 12:12:19 -0800 Subject: [PATCH 05/18] Revert PHP v7 and default environement variable changes --- .travis.yml | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/.travis.yml b/.travis.yml index 0c04ef3..807c235 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,7 +11,11 @@ notifications: php: - 5.4 - - 7.4 + - 7.0 + - 7.1 + +env: + - WP_VERSION=latest WP_MULTISITE=0 matrix: include: @@ -22,19 +26,17 @@ matrix: env: WP_VERSION=4.4 WP_MULTISITE=0 - php: 5.4 dist: trusty - env: WP_VERSION=4.4 WP_MULTISITE=1 - - php: 7.4 - env: WP_VERSION=latest WP_MULTISITE=0 - - php: 7.4 env: WP_VERSION=latest WP_MULTISITE=1 before_script: - bash bin/install-wp-tests.sh wordpress_test root '' localhost $WP_VERSION - | - if [[ ${TRAVIS_PHP_VERSION:0:3} == "7.4" ]]; then - composer global require "phpunit/phpunit=^7" + if [[ ${TRAVIS_PHP_VERSION:0:3} == "7.0" ]]; then + composer global require "phpunit/phpunit=6.*" + elif [[ ${TRAVIS_PHP_VERSION:0:2} == "7." ]]; then + composer global require "phpunit/phpunit=7.*" else - composer global require "phpunit/phpunit=^4" + composer global require "phpunit/phpunit=4.8.*" fi - | - composer install @@ -56,4 +58,4 @@ deploy: script: sh bin/deploy.sh on: branch: master - php: 7.1 + php: 7.0 From faf697514b9f27429629e832ea7909358d2b6fc9 Mon Sep 17 00:00:00 2001 From: Brett Stevenson Date: Tue, 5 Jan 2021 14:53:44 -0800 Subject: [PATCH 06/18] Update Composer dependencies to be v2 compatible --- composer.json | 4 +- composer.lock | 129 ++++++++++++++++++++++++++++++++++---------------- 2 files changed, 90 insertions(+), 43 deletions(-) diff --git a/composer.json b/composer.json index de72247..8a1267f 100644 --- a/composer.json +++ b/composer.json @@ -17,11 +17,11 @@ "type": "wordpress-plugin", "require": { "php": ">=5.4.0", - "composer/installers": "v1.2.0" + "composer/installers": "v1.9.0" }, "require-dev": { "squizlabs/php_codesniffer": "^3.0.2", - "dealerdirect/phpcodesniffer-composer-installer": "^0.4.4", + "dealerdirect/phpcodesniffer-composer-installer": "^0.7.1", "wp-coding-standards/wpcs": "^0.14.0" } } diff --git a/composer.lock b/composer.lock index ab03dc7..82d9d42 100644 --- a/composer.lock +++ b/composer.lock @@ -1,35 +1,38 @@ { "_readme": [ "This file locks the dependencies of your project to a known state", - "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", + "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "8a92962c5df6d5e206f1c1b4898827f7", + "content-hash": "17d91f51fe9bba5f0f0199edcb793538", "packages": [ { "name": "composer/installers", - "version": "v1.2.0", + "version": "v1.9.0", "source": { "type": "git", "url": "https://github.com/composer/installers.git", - "reference": "d78064c68299743e0161004f2de3a0204e33b804" + "reference": "b93bcf0fa1fccb0b7d176b0967d969691cd74cca" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/installers/zipball/d78064c68299743e0161004f2de3a0204e33b804", - "reference": "d78064c68299743e0161004f2de3a0204e33b804", + "url": "https://api.github.com/repos/composer/installers/zipball/b93bcf0fa1fccb0b7d176b0967d969691cd74cca", + "reference": "b93bcf0fa1fccb0b7d176b0967d969691cd74cca", "shasum": "" }, "require": { - "composer-plugin-api": "^1.0" + "composer-plugin-api": "^1.0 || ^2.0" }, "replace": { "roundcube/plugin-installer": "*", "shama/baton": "*" }, "require-dev": { - "composer/composer": "1.0.*@dev", - "phpunit/phpunit": "4.1.*" + "composer/composer": "1.6.* || 2.0.*@dev", + "composer/semver": "1.0.* || 2.0.*@dev", + "phpunit/phpunit": "^4.8.36", + "sebastian/comparator": "^1.2.4", + "symfony/process": "^2.3" }, "type": "composer-plugin", "extra": { @@ -59,15 +62,22 @@ "keywords": [ "Craft", "Dolibarr", + "Eliasis", "Hurad", "ImageCMS", + "Kanboard", + "Lan Management System", "MODX Evo", + "MantisBT", "Mautic", + "Maya", "OXID", "Plentymarkets", + "Porto", "RadPHP", "SMF", "Thelia", + "Whmcs", "WolfCMS", "agl", "aimeos", @@ -82,28 +92,38 @@ "croogo", "dokuwiki", "drupal", + "eZ Platform", "elgg", "expressionengine", "fuelphp", "grav", "installer", + "itop", "joomla", + "known", "kohana", "laravel", + "lavalite", "lithium", "magento", + "majima", "mako", "mediawiki", "modulework", + "modx", "moodle", + "osclass", "phpbb", "piwik", "ppi", "puppet", + "pxcms", "reindex", "roundcube", "shopware", "silverstripe", + "sydes", + "sylius", "symfony", "typo3", "wordpress", @@ -111,35 +131,47 @@ "zend", "zikula" ], - "time": "2016-08-13T20:53:52+00:00" + "support": { + "issues": "https://github.com/composer/installers/issues", + "source": "https://github.com/composer/installers/tree/v1.9.0" + }, + "funding": [ + { + "url": "https://packagist.com", + "type": "custom" + }, + { + "url": "https://tidelift.com/funding/github/packagist/composer/composer", + "type": "tidelift" + } + ], + "time": "2020-04-07T06:57:05+00:00" } ], "packages-dev": [ { "name": "dealerdirect/phpcodesniffer-composer-installer", - "version": "v0.4.4", + "version": "v0.7.1", "source": { "type": "git", "url": "https://github.com/Dealerdirect/phpcodesniffer-composer-installer.git", - "reference": "2e41850d5f7797cbb1af7b030d245b3b24e63a08" + "reference": "fe390591e0241955f22eb9ba327d137e501c771c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Dealerdirect/phpcodesniffer-composer-installer/zipball/2e41850d5f7797cbb1af7b030d245b3b24e63a08", - "reference": "2e41850d5f7797cbb1af7b030d245b3b24e63a08", + "url": "https://api.github.com/repos/Dealerdirect/phpcodesniffer-composer-installer/zipball/fe390591e0241955f22eb9ba327d137e501c771c", + "reference": "fe390591e0241955f22eb9ba327d137e501c771c", "shasum": "" }, "require": { - "composer-plugin-api": "^1.0", - "php": "^5.3|^7", - "squizlabs/php_codesniffer": "*" + "composer-plugin-api": "^1.0 || ^2.0", + "php": ">=5.3", + "squizlabs/php_codesniffer": "^2.0 || ^3.0 || ^4.0" }, "require-dev": { "composer/composer": "*", - "wimg/php-compatibility": "^8.0" - }, - "suggest": { - "dealerdirect/qa-tools": "All the PHP QA tools you'll need" + "phpcompatibility/php-compatibility": "^9.0", + "sensiolabs/security-checker": "^4.1.0" }, "type": "composer-plugin", "extra": { @@ -157,13 +189,13 @@ "authors": [ { "name": "Franck Nijhof", - "email": "f.nijhof@dealerdirect.nl", - "homepage": "http://workingatdealerdirect.eu", - "role": "Developer" + "email": "franck.nijhof@dealerdirect.com", + "homepage": "http://www.frenck.nl", + "role": "Developer / IT Manager" } ], "description": "PHP_CodeSniffer Standards Composer Installer Plugin", - "homepage": "http://workingatdealerdirect.eu", + "homepage": "http://www.dealerdirect.com", "keywords": [ "PHPCodeSniffer", "PHP_CodeSniffer", @@ -181,20 +213,24 @@ "stylecheck", "tests" ], - "time": "2017-12-06T16:27:17+00:00" + "support": { + "issues": "https://github.com/dealerdirect/phpcodesniffer-composer-installer/issues", + "source": "https://github.com/dealerdirect/phpcodesniffer-composer-installer" + }, + "time": "2020-12-07T18:04:37+00:00" }, { "name": "squizlabs/php_codesniffer", - "version": "3.2.2", + "version": "3.5.8", "source": { "type": "git", "url": "https://github.com/squizlabs/PHP_CodeSniffer.git", - "reference": "d7c00c3000ac0ce79c96fcbfef86b49a71158cd1" + "reference": "9d583721a7157ee997f235f327de038e7ea6dac4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/d7c00c3000ac0ce79c96fcbfef86b49a71158cd1", - "reference": "d7c00c3000ac0ce79c96fcbfef86b49a71158cd1", + "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/9d583721a7157ee997f235f327de038e7ea6dac4", + "reference": "9d583721a7157ee997f235f327de038e7ea6dac4", "shasum": "" }, "require": { @@ -204,7 +240,7 @@ "php": ">=5.4.0" }, "require-dev": { - "phpunit/phpunit": "^4.0 || ^5.0 || ^6.0" + "phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0" }, "bin": [ "bin/phpcs", @@ -227,25 +263,30 @@ } ], "description": "PHP_CodeSniffer tokenizes PHP, JavaScript and CSS files and detects violations of a defined set of coding standards.", - "homepage": "http://www.squizlabs.com/php-codesniffer", + "homepage": "https://github.com/squizlabs/PHP_CodeSniffer", "keywords": [ "phpcs", "standards" ], - "time": "2017-12-19T21:44:46+00:00" + "support": { + "issues": "https://github.com/squizlabs/PHP_CodeSniffer/issues", + "source": "https://github.com/squizlabs/PHP_CodeSniffer", + "wiki": "https://github.com/squizlabs/PHP_CodeSniffer/wiki" + }, + "time": "2020-10-23T02:01:07+00:00" }, { "name": "wp-coding-standards/wpcs", - "version": "0.14.0", + "version": "0.14.1", "source": { "type": "git", - "url": "https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards.git", - "reference": "8cadf48fa1c70b2381988e0a79e029e011a8f41c" + "url": "https://github.com/WordPress/WordPress-Coding-Standards.git", + "reference": "cf6b310caad735816caef7573295f8a534374706" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/WordPress-Coding-Standards/WordPress-Coding-Standards/zipball/8cadf48fa1c70b2381988e0a79e029e011a8f41c", - "reference": "8cadf48fa1c70b2381988e0a79e029e011a8f41c", + "url": "https://api.github.com/repos/WordPress/WordPress-Coding-Standards/zipball/cf6b310caad735816caef7573295f8a534374706", + "reference": "cf6b310caad735816caef7573295f8a534374706", "shasum": "" }, "require": { @@ -272,7 +313,12 @@ "standards", "wordpress" ], - "time": "2017-11-01T15:10:46+00:00" + "support": { + "issues": "https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards/issues", + "source": "https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards", + "wiki": "https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards/wiki" + }, + "time": "2018-02-16T01:57:48+00:00" } ], "aliases": [], @@ -281,7 +327,8 @@ "prefer-stable": false, "prefer-lowest": false, "platform": { - "php": ">=5.4.45" + "php": ">=5.4.0" }, - "platform-dev": [] + "platform-dev": [], + "plugin-api-version": "2.0.0" } From 65557eef993f3f7d88bc21288e8746bbe461fcd9 Mon Sep 17 00:00:00 2001 From: Brett Stevenson Date: Tue, 5 Jan 2021 15:52:57 -0800 Subject: [PATCH 07/18] Modify phpunit versions and use trusty for all builds --- .travis.yml | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/.travis.yml b/.travis.yml index 807c235..9490cff 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,6 +9,9 @@ notifications: on_success: never on_failure: change +# PHP v5.4 isn't supported in the default build environment +dist: trusty + php: - 5.4 - 7.0 @@ -20,21 +23,17 @@ env: matrix: include: - php: 5.4 - # PHP v5.4 isn't supported in the default build environment - # Only use Trusty environment for v5.4 builds because it increases queue time - dist: trusty env: WP_VERSION=4.4 WP_MULTISITE=0 - php: 5.4 - dist: trusty env: WP_VERSION=latest WP_MULTISITE=1 before_script: - bash bin/install-wp-tests.sh wordpress_test root '' localhost $WP_VERSION - | if [[ ${TRAVIS_PHP_VERSION:0:3} == "7.0" ]]; then - composer global require "phpunit/phpunit=6.*" + composer global require "phpunit/phpunit=6.5.*" elif [[ ${TRAVIS_PHP_VERSION:0:2} == "7." ]]; then - composer global require "phpunit/phpunit=7.*" + composer global require "phpunit/phpunit=7.5.*" else composer global require "phpunit/phpunit=4.8.*" fi From 55ae3d9ab9004de010855b1291ef2b7a0b39b14b Mon Sep 17 00:00:00 2001 From: Brett Stevenson Date: Wed, 6 Jan 2021 10:20:50 -0800 Subject: [PATCH 08/18] Modify default environment variables and add PHP v7.4 build --- .travis.yml | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 9490cff..129d6fc 100644 --- a/.travis.yml +++ b/.travis.yml @@ -16,16 +16,21 @@ php: - 5.4 - 7.0 - 7.1 + - 7.4 env: - - WP_VERSION=latest WP_MULTISITE=0 + - WP_VERSION=4.4 WP_MULTISITE=0 matrix: include: - - php: 5.4 - env: WP_VERSION=4.4 WP_MULTISITE=0 - php: 5.4 env: WP_VERSION=latest WP_MULTISITE=1 + - php: 7.0 + env: WP_VERSION=latest WP_MULTISITE=0 + - php: 7.1 + env: WP_VERSION=latest WP_MULTISITE=0 + - php: 7.4 + env: WP_VERSION=latest WP_MULTISITE=0 before_script: - bash bin/install-wp-tests.sh wordpress_test root '' localhost $WP_VERSION @@ -33,7 +38,7 @@ before_script: if [[ ${TRAVIS_PHP_VERSION:0:3} == "7.0" ]]; then composer global require "phpunit/phpunit=6.5.*" elif [[ ${TRAVIS_PHP_VERSION:0:2} == "7." ]]; then - composer global require "phpunit/phpunit=7.5.*" + composer global require "phpunit/phpunit=7.5.*"g else composer global require "phpunit/phpunit=4.8.*" fi From 324ecf00b57a2b8db450a3dbe47ead2eb753d294 Mon Sep 17 00:00:00 2001 From: Brett Stevenson Date: Wed, 6 Jan 2021 10:39:30 -0800 Subject: [PATCH 09/18] Modify PHP versions to Wordpress compatible versions --- .travis.yml | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/.travis.yml b/.travis.yml index 129d6fc..f3a9e6c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,28 +9,25 @@ notifications: on_success: never on_failure: change -# PHP v5.4 isn't supported in the default build environment +# PHP v5.6 isn't supported in the default build environment dist: trusty php: - - 5.4 + # PHP v5.6 is the oldest version Wordpress supports + - 5.6 - 7.0 - 7.1 - 7.4 env: - - WP_VERSION=4.4 WP_MULTISITE=0 + - WP_VERSION=latest WP_MULTISITE=0 matrix: include: - - php: 5.4 + - php: 5.6 + env: WP_VERSION=4.4 WP_MULTISITE=0 + - php: 5.6 env: WP_VERSION=latest WP_MULTISITE=1 - - php: 7.0 - env: WP_VERSION=latest WP_MULTISITE=0 - - php: 7.1 - env: WP_VERSION=latest WP_MULTISITE=0 - - php: 7.4 - env: WP_VERSION=latest WP_MULTISITE=0 before_script: - bash bin/install-wp-tests.sh wordpress_test root '' localhost $WP_VERSION From 026597ce74e1a490167d2d94bbca0ae03562b455 Mon Sep 17 00:00:00 2001 From: Brett Stevenson Date: Wed, 6 Jan 2021 11:39:26 -0800 Subject: [PATCH 10/18] Fix issue with phpunit version --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index f3a9e6c..c54f104 100644 --- a/.travis.yml +++ b/.travis.yml @@ -35,7 +35,7 @@ before_script: if [[ ${TRAVIS_PHP_VERSION:0:3} == "7.0" ]]; then composer global require "phpunit/phpunit=6.5.*" elif [[ ${TRAVIS_PHP_VERSION:0:2} == "7." ]]; then - composer global require "phpunit/phpunit=7.5.*"g + composer global require "phpunit/phpunit=7.5.*" else composer global require "phpunit/phpunit=4.8.*" fi From 14dc4664f9c0e81f6114a4373fcf1b2e9ff02d70 Mon Sep 17 00:00:00 2001 From: Brett Stevenson Date: Wed, 6 Jan 2021 12:37:10 -0800 Subject: [PATCH 11/18] Update deprecated config keys --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index c54f104..08c7e05 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,4 +1,4 @@ -sudo: required +os: linux language: php @@ -22,7 +22,7 @@ php: env: - WP_VERSION=latest WP_MULTISITE=0 -matrix: +jobs: include: - php: 5.6 env: WP_VERSION=4.4 WP_MULTISITE=0 From 3b8643c9e7c5c137fa2db1200d371c4f9b986239 Mon Sep 17 00:00:00 2001 From: Brett Stevenson Date: Wed, 6 Jan 2021 12:56:27 -0800 Subject: [PATCH 12/18] Limit legacy builds and add multi-site builds --- .travis.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.travis.yml b/.travis.yml index 08c7e05..03fdfb2 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,25 +9,25 @@ notifications: on_success: never on_failure: change -# PHP v5.6 isn't supported in the default build environment +# PHP v5.x isn't supported in the default build environment dist: trusty php: - # PHP v5.6 is the oldest version Wordpress supports - - 5.6 - 7.0 - 7.1 - - 7.4 + - 7.3 env: - WP_VERSION=latest WP_MULTISITE=0 + - WP_VERSION=latest WP_MULTISITE=1 jobs: include: - - php: 5.6 + # Canary for our oldest-supported version + - name: Legacy + # PHP v5.6 is the oldest version Wordpress supports + php: 5.6 env: WP_VERSION=4.4 WP_MULTISITE=0 - - php: 5.6 - env: WP_VERSION=latest WP_MULTISITE=1 before_script: - bash bin/install-wp-tests.sh wordpress_test root '' localhost $WP_VERSION @@ -40,7 +40,7 @@ before_script: composer global require "phpunit/phpunit=4.8.*" fi - | - - composer install + - composer install --no-interaction - nvm install --lts - nvm use --lts - npm install -g yarn From a8f62889f1c548883c9319e1ef108010a55332d4 Mon Sep 17 00:00:00 2001 From: Brett Stevenson Date: Wed, 6 Jan 2021 13:39:44 -0800 Subject: [PATCH 13/18] Add dependency caching and test script to prevent multiple CI builds for multisite testing --- .travis.yml | 28 +++++++++++++++++----------- bin/test.sh | 11 +++++++++++ 2 files changed, 28 insertions(+), 11 deletions(-) create mode 100644 bin/test.sh diff --git a/.travis.yml b/.travis.yml index 03fdfb2..a75c3ec 100644 --- a/.travis.yml +++ b/.travis.yml @@ -18,26 +18,32 @@ php: - 7.3 env: - - WP_VERSION=latest WP_MULTISITE=0 - - WP_VERSION=latest WP_MULTISITE=1 + - WP_VERSION=latest jobs: include: # Canary for our oldest-supported version - - name: Legacy - # PHP v5.6 is the oldest version Wordpress supports - php: 5.6 - env: WP_VERSION=4.4 WP_MULTISITE=0 + # PHP v5.6 is the oldest version Wordpress supports + - php: 5.6 + env: WP_VERSION=4.4 + +# Enable dependency caching +cache: + apt: true + directories: + - vendor + - $HOME/.npm + - $HOME/.composer/cache before_script: - bash bin/install-wp-tests.sh wordpress_test root '' localhost $WP_VERSION - | - if [[ ${TRAVIS_PHP_VERSION:0:3} == "7.0" ]]; then + if [[ ${TRAVIS_PHP_VERSION:0:3} == "5.6" ]]; then + composer global require "phpunit/phpunit=4.8.*" + elif [[ ${TRAVIS_PHP_VERSION:0:3} == "7.0" ]]; then composer global require "phpunit/phpunit=6.5.*" - elif [[ ${TRAVIS_PHP_VERSION:0:2} == "7." ]]; then - composer global require "phpunit/phpunit=7.5.*" else - composer global require "phpunit/phpunit=4.8.*" + composer global require "phpunit/phpunit=7.*" fi - | - composer install --no-interaction @@ -49,7 +55,7 @@ before_script: script: - ./vendor/bin/phpcs -s --standard=phpcs.ruleset.xml - - phpunit + - ./bin/test.sh - yarn run build - npm test diff --git a/bin/test.sh b/bin/test.sh new file mode 100644 index 0000000..851c4fe --- /dev/null +++ b/bin/test.sh @@ -0,0 +1,11 @@ +#!/usr/bin/env bash +# Run PHPUnit with and without multisite enabled to prevent the need for +# multiple CI builds + +# Run single-site unit tests +export WP_MULTISITE=0 +phpunit --exclude-group=ms-required + +# Run Multisite unit tests +export WP_MULTISITE=1 +phpunit --exclude-group=ms-excluded From f481830018c1b50b192e5c9df97a5edd3bca8078 Mon Sep 17 00:00:00 2001 From: Brett Stevenson Date: Wed, 6 Jan 2021 14:31:45 -0800 Subject: [PATCH 14/18] Fix testing script permissions issue --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index a75c3ec..7979eec 100644 --- a/.travis.yml +++ b/.travis.yml @@ -55,7 +55,7 @@ before_script: script: - ./vendor/bin/phpcs -s --standard=phpcs.ruleset.xml - - ./bin/test.sh + - bash bin/test.sh - yarn run build - npm test From eadb7cffad7a6e0bbedc4e344d8e3717fdf98a85 Mon Sep 17 00:00:00 2001 From: Brett Stevenson Date: Wed, 6 Jan 2021 15:01:10 -0800 Subject: [PATCH 15/18] Troubleshoot phpunit version specifications --- .travis.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 7979eec..4a85585 100644 --- a/.travis.yml +++ b/.travis.yml @@ -39,11 +39,11 @@ before_script: - bash bin/install-wp-tests.sh wordpress_test root '' localhost $WP_VERSION - | if [[ ${TRAVIS_PHP_VERSION:0:3} == "5.6" ]]; then - composer global require "phpunit/phpunit=4.8.*" + composer global require "phpunit/phpunit:4.8" elif [[ ${TRAVIS_PHP_VERSION:0:3} == "7.0" ]]; then - composer global require "phpunit/phpunit=6.5.*" + composer global require "phpunit/phpunit:6.5" else - composer global require "phpunit/phpunit=7.*" + composer global require "phpunit/phpunit:7.5" fi - | - composer install --no-interaction From 669840720ab271400797b9b0331da89673a729dd Mon Sep 17 00:00:00 2001 From: Brett Stevenson Date: Wed, 6 Jan 2021 15:30:04 -0800 Subject: [PATCH 16/18] Use phpunit version installed by composer --- bin/test.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) mode change 100644 => 100755 bin/test.sh diff --git a/bin/test.sh b/bin/test.sh old mode 100644 new mode 100755 index 851c4fe..1f5a2d0 --- a/bin/test.sh +++ b/bin/test.sh @@ -4,8 +4,8 @@ # Run single-site unit tests export WP_MULTISITE=0 -phpunit --exclude-group=ms-required +./vendor/bin/phpunit --exclude-group=ms-required # Run Multisite unit tests export WP_MULTISITE=1 -phpunit --exclude-group=ms-excluded +./vendor/bin/phpunit --exclude-group=ms-excluded From 1ff273622737c1b66bfed827f04fb3eed705a4ae Mon Sep 17 00:00:00 2001 From: Brett Stevenson Date: Wed, 6 Jan 2021 15:56:08 -0800 Subject: [PATCH 17/18] Remove global arg from composer require phpunit version --- .travis.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 4a85585..02d4d59 100644 --- a/.travis.yml +++ b/.travis.yml @@ -39,11 +39,11 @@ before_script: - bash bin/install-wp-tests.sh wordpress_test root '' localhost $WP_VERSION - | if [[ ${TRAVIS_PHP_VERSION:0:3} == "5.6" ]]; then - composer global require "phpunit/phpunit:4.8" + composer require phpunit/phpunit "^4.8" elif [[ ${TRAVIS_PHP_VERSION:0:3} == "7.0" ]]; then - composer global require "phpunit/phpunit:6.5" + composer require phpunit/phpunit "^6.5" else - composer global require "phpunit/phpunit:7.5" + composer require phpunit/phpunit "^7.5" fi - | - composer install --no-interaction From 93e513e931eb6dc45269d1f2b4463623fd5d51ed Mon Sep 17 00:00:00 2001 From: Brett Stevenson Date: Thu, 7 Jan 2021 17:08:47 -0800 Subject: [PATCH 18/18] Update deprecated cleanup key --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 02d4d59..2cbee4e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -61,7 +61,7 @@ script: deploy: provider: script - skip_cleanup: true + cleanup: false script: sh bin/deploy.sh on: branch: master