diff --git a/.travis.yml b/.travis.yml index f65fbe4..2cbee4e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,39 +1,52 @@ -sudo: required +os: linux language: php +services: mysql + notifications: email: on_success: never on_failure: change +# PHP v5.x isn't supported in the default build environment +dist: trusty + php: - - 5.4 - 7.0 - 7.1 + - 7.3 env: - - WP_VERSION=latest WP_MULTISITE=0 + - WP_VERSION=latest -matrix: +jobs: include: - - php: 5.4 - env: WP_VERSION=4.4 WP_MULTISITE=0 - - php: 5.4 - env: WP_VERSION=latest WP_MULTISITE=1 + # Canary for our oldest-supported version + # 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 - 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} == "5.6" ]]; then + composer require phpunit/phpunit "^4.8" + elif [[ ${TRAVIS_PHP_VERSION:0:3} == "7.0" ]]; then + composer require phpunit/phpunit "^6.5" else - composer global require "phpunit/phpunit=4.8.*" + composer require phpunit/phpunit "^7.5" fi - | - - composer install + - composer install --no-interaction - nvm install --lts - nvm use --lts - npm install -g yarn @@ -42,13 +55,13 @@ before_script: script: - ./vendor/bin/phpcs -s --standard=phpcs.ruleset.xml - - phpunit + - bash bin/test.sh - yarn run build - npm test deploy: provider: script - skip_cleanup: true + cleanup: false script: sh bin/deploy.sh on: branch: master diff --git a/bin/test.sh b/bin/test.sh new file mode 100755 index 0000000..1f5a2d0 --- /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 +./vendor/bin/phpunit --exclude-group=ms-required + +# Run Multisite unit tests +export WP_MULTISITE=1 +./vendor/bin/phpunit --exclude-group=ms-excluded 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" }