From ff3aeef0f6a4590fec4dc5996f3868511d629d2d Mon Sep 17 00:00:00 2001 From: Erick Hitter <git-contrib@ethitter.com> Date: Mon, 11 Sep 2017 16:34:18 -0700 Subject: [PATCH] Require PHP 7 to support whitelists/blacklists From the PHP manual: ``` In PHP 5, value must be a scalar value.... In PHP 7, array values are also accepted. ``` --- .travis.yml | 10 +++------- README.md | 6 +++++- readme.txt | 6 +++++- 3 files changed, 13 insertions(+), 9 deletions(-) diff --git a/.travis.yml b/.travis.yml index 9b2dc3e..3a562df 100644 --- a/.travis.yml +++ b/.travis.yml @@ -14,17 +14,13 @@ cache: matrix: include: + - php: nightly + env: WP_VERSION=latest - php: 7.1 env: WP_VERSION=latest - php: 7.0 env: WP_VERSION=latest - - php: 5.6 - env: WP_VERSION=4.4 - - php: 5.6 - env: WP_VERSION=latest - - php: 5.6 - env: WP_VERSION=trunk - - php: 5.6 + - php: 7.1 env: WP_TRAVISCI=phpcs before_script: diff --git a/README.md b/README.md index 8ab7fa5..1f8a4c0 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ **Tags:** wp-cli, cli, cron, cron control **Requires at least:** 4.8.1 **Tested up to:** 4.9 -**Requires PHP:** 5.6 +**Requires PHP:** 7.0 **Stable tag:** 0.1.0 **License:** GPLv2 or later **License URI:** http://www.gnu.org/licenses/gpl-2.0.html @@ -23,6 +23,10 @@ Provides a WP-CLI command to schedule these events. A UI is under consideration. ## Frequently Asked Questions ## +### Why is PHP 7 required? ### + +To support arrays in constants set using `define()`, PHP 7 is required. These are used to set whitelists and blacklists, though filters are also provided; see below. + ### Does this support custom WP-CLI commands? ### Yes. By default, no restrictions are placed on what commands are supported, as those restrictions depend on the environment where this plugin is used. That said, see the following sections regarding support for whitelists and blacklists. diff --git a/readme.txt b/readme.txt index 4cd4e8e..89ea926 100644 --- a/readme.txt +++ b/readme.txt @@ -3,7 +3,7 @@ Contributors: ethitter, automattic Tags: wp-cli, cli, cron, cron control Requires at least: 4.8.1 Tested up to: 4.9 -Requires PHP: 5.6 +Requires PHP: 7.0 Stable tag: 0.1.0 License: GPLv2 or later License URI: http://www.gnu.org/licenses/gpl-2.0.html @@ -23,6 +23,10 @@ Provides a WP-CLI command to schedule these events. A UI is under consideration. == Frequently Asked Questions == += Why is PHP 7 required? = + +To support arrays in constants set using `define()`, PHP 7 is required. These are used to set whitelists and blacklists, though filters are also provided; see below. + = Does this support custom WP-CLI commands? = Yes. By default, no restrictions are placed on what commands are supported, as those restrictions depend on the environment where this plugin is used. That said, see the following sections regarding support for whitelists and blacklists. -- GitLab