Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add PHP 7.4 Support #251

Open
wants to merge 12 commits into
base: master
Choose a base branch
from
10 changes: 8 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ php:
- 7.1
- 7.2
- 7.3
- 7.4snapshot
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems per #251 (comment) that Travis has the 7.4 image available now. I think that we should probably be using that before merge. Here's an example of folks using the new image already: https://github.com/google/site-kit-wp/pull/946/files

env:
- WP_VERSION=latest
- WP_VERSION=4.5
Expand All @@ -30,12 +31,17 @@ matrix:
env: WP_VERSION=5.2 WP_MULTISITE=1
- php: 7.3
env: WP_VERSION=latest WP_MULTISITE=1
- php: 7.3
- php: 7.4snapshot
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have a few more references to the snapshot version in the yaml and also the version tested against is 5.2 which is not php 7.4 compatible. We may need to use 5.3 as our target version or CI will fail and not allow us to merge/publish this release. There are two other references to the 7.4 snapshot and 5.2 WordPress.

env: WP_VERSION=5.2 WP_MULTISITE=1
- php: 7.4snapshot
env: WP_VERSION=latest WP_MULTISITE=1
- php: 7.4snapshot
env: NPM_TESTS=1
exclude:
- php: 7.3
env: WP_VERSION=4.5

- php: 7.4snapshot
env: WP_VERSION=4.5

before_script:
- |
Expand Down
48 changes: 25 additions & 23 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 11 additions & 8 deletions readme.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# PHP Compatibility Checker <a href="https://travis-ci.org/wpengine/phpcompat"><img src="https://travis-ci.org/wpengine/phpcompat.svg?branch=master"></a>
**Contributors:** [wpengine](https://profiles.wordpress.org/wpengine), [octalmage](https://profiles.wordpress.org/octalmage), [stevenkword](https://profiles.wordpress.org/stevenkword), [Taylor4484](https://profiles.wordpress.org/Taylor4484), [pross](https://profiles.wordpress.org/pross), [jcross](https://profiles.wordpress.org/jcross)
**Contributors:** [wpengine](https://profiles.wordpress.org/wpengine), [octalmage](https://profiles.wordpress.org/octalmage), [stevenkword](https://profiles.wordpress.org/stevenkword), [Taylor4484](https://profiles.wordpress.org/Taylor4484), [pross](https://profiles.wordpress.org/pross), [jcross](https://profiles.wordpress.org/jcross), [shooper](https://profiles.wordpress.org/shooper)
**Tags:** php 7, php 5.5, php, version, compatibility, checker, wp engine, wpe, wpengine
**Requires at least:** 3.5
**Tested up to:** 5.2.2
**Stable tag:** 1.5.0
**Tested up to:** 5.3.0
**Stable tag:** 1.6.0
**License:** GPLv2 or later
**License URI:** http://www.gnu.org/licenses/gpl-2.0.html

Expand All @@ -21,11 +21,11 @@ This plugin will lint theme and plugin code inside your WordPress file system an

**This plugin relies on WP-Cron to scan files in the background. The scan will get stuck if the site's WP-Cron isn't running correctly. Please see the [FAQ](https://wordpress.org/plugins/php-compatibility-checker/faq/) for more information.**

### Update to PHP 7.3 ###
* Use this plugin to check your site for compatibility up to PHP 7.3!
* As of [July 2019](https://wordpress.org/about/stats/), 20.1% of WordPress websites run a PHP version older than PHP 5.6.
### Update to PHP 7.4 ###
* Use this plugin to check your site for compatibility up to PHP 7.4!
* As of [November 2019](https://wordpress.org/about/stats/), 12.9% of WordPress websites run a PHP version older than PHP 5.6.
* These versions of PHP have been [deprecated and unsupported](https://secure.php.net/supported-versions.php) for over 2 years.
* Only 54.1% of WordPress websites run PHP 7, the current main version of PHP.
* Only 63.1% of WordPress websites run PHP 7, the current main version of PHP.


### Disclaimer ###
Expand Down Expand Up @@ -64,7 +64,7 @@ PHP Compatibility Checker includes WP-CLI command support:
- active
- all

Example: `wp phpcompat 7.2 --scan=active`
Example: `wp phpcompat 7.4 --scan=active`


## Frequently Asked Questions ##
Expand Down Expand Up @@ -117,6 +117,9 @@ To disclose security issues for this plugin please email [email protected]


## Changelog ##
### 1.6.0 ###
- Added support for PHP 7.4 compatibility checks

### 1.5.0 ###
- Added support for PHP 7.3 compatibility checks

Expand Down
19 changes: 11 additions & 8 deletions readme.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
=== PHP Compatibility Checker ===
Contributors: wpengine, octalmage, stevenkword, Taylor4484, pross, jcross
Contributors: wpengine, octalmage, stevenkword, Taylor4484, pross, jcross, shooper
Tags: php 7, php 5.5, php, version, compatibility, checker, wp engine, wpe, wpengine
Requires at least: 3.5
Tested up to: 5.2.2
Stable tag: 1.5.0
Tested up to: 5.3.0
Stable tag: 1.6.0
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html

Expand All @@ -21,11 +21,11 @@ This plugin will lint theme and plugin code inside your WordPress file system an

**This plugin relies on WP-Cron to scan files in the background. The scan will get stuck if the site's WP-Cron isn't running correctly. Please see the [FAQ](https://wordpress.org/plugins/php-compatibility-checker/faq/) for more information.**

= Update to PHP 7.3 =
* Use this plugin to check your site for compatibility up to PHP 7.3!
* As of [July 2019](https://wordpress.org/about/stats/), 20.1% of WordPress websites run a PHP version older than PHP 5.6.
= Update to PHP 7.4 =
* Use this plugin to check your site for compatibility up to PHP 7.4!
* As of [November 2019](https://wordpress.org/about/stats/), 12.9% of WordPress websites run a PHP version older than PHP 5.6.
* These versions of PHP have been [deprecated and unsupported](https://secure.php.net/supported-versions.php) for over 2 years.
* Only 54.1% of WordPress websites run PHP 7, the current main version of PHP.
* Only 63.1% of WordPress websites run PHP 7, the current main version of PHP.


= Disclaimer =
Expand Down Expand Up @@ -64,7 +64,7 @@ PHP Compatibility Checker includes WP-CLI command support:
- active
- all
`
Example: `wp phpcompat 7.2 --scan=active`
Example: `wp phpcompat 7.4 --scan=active`


== Frequently Asked Questions ==
Expand Down Expand Up @@ -113,6 +113,9 @@ To disclose security issues for this plugin please email [email protected]
2. Compatibility results screen

== Changelog ==
= 1.6.0 =
- Added support for PHP 7.4 compatibility checks

= 1.5.0 =
- Added support for PHP 7.3 compatibility checks

Expand Down
3 changes: 2 additions & 1 deletion wpengine-phpcompat.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
* Plugin URI: https://wpengine.com
* Description: Make sure your plugins and themes are compatible with newer PHP versions.
* Author: WP Engine
* Version: 1.5.0
* Version: 1.6.0
* Author URI: https://wpengine.com
* Text Domain: php-compatibility-checker
*/
Expand Down Expand Up @@ -118,6 +118,7 @@ function get_phpversions() {

if ( version_compare( phpversion(), '5.3', '>=' ) ) {
$versions = array( 'PHP 7.3' => '7.3' ) + $versions;
$versions = array( 'PHP 7.4' => '7.4' ) + $versions;
}

$old_versions = array( '5.6', '5.5', '5.4', '5.3' );
Expand Down