Skip to content

Commit

Permalink
Bump required PHP version to 5.6 to utilize spread operator
Browse files Browse the repository at this point in the history
See #2431
  • Loading branch information
westonruter committed Jan 24, 2020
1 parent aab6f96 commit c03fd4f
Show file tree
Hide file tree
Showing 7 changed files with 53 additions and 45 deletions.
16 changes: 4 additions & 12 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -118,21 +118,13 @@ jobs:
php: "7.1"
env: WP_VERSION=latest DEV_LIB_ONLY=phpunit,phpsyntax INSTALL_PWA_PLUGIN=1

- name: PHP unit tests (7.0, WordPress latest)
- name: PHP unit tests (7.0, WordPress 5.1)
php: "7.0"
env: WP_VERSION=latest DEV_LIB_ONLY=phpunit,phpsyntax INSTALL_PWA_PLUGIN=1
env: WP_VERSION=5.1 DEV_LIB_ONLY=phpunit,phpsyntax INSTALL_PWA_PLUGIN=1

- name: PHP unit tests (5.6, WordPress latest)
- name: PHP unit tests (5.6, WordPress 5.0)
php: "5.6"
env: WP_VERSION=latest DEV_LIB_ONLY=phpunit,phpsyntax INSTALL_PWA_PLUGIN=1

- name: PHP unit tests (5.4, WordPress 5.1)
php: "5.4"
env: WP_VERSION=5.1 DEV_LIB_ONLY=phpunit

- name: PHP unit tests (5.5, WordPress 5.0)
php: "5.5"
env: WP_VERSION=5.0 DEV_LIB_ONLY=phpunit,phpsyntax
env: WP_VERSION=5.0 DEV_LIB_ONLY=phpunit,phpsyntax INSTALL_PWA_PLUGIN=1

- name: PHP unit tests w/ external-http (5.6, WordPress 4.9)
php: "5.6"
Expand Down
2 changes: 1 addition & 1 deletion amp.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@

$_amp_load_errors = new WP_Error();

if ( version_compare( phpversion(), '5.4', '<' ) ) {
if ( version_compare( phpversion(), '5.6', '<' ) ) {
$_amp_load_errors->add(
'insufficient_php_version',
sprintf(
Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"homepage": "https://github.com/ampproject/amp-wp",
"license": "GPL-2.0-or-later",
"require": {
"php": "^5.4 || ^7.0",
"php": "^5.6 || ^7.0",
"ext-curl": "*",
"ext-date": "*",
"ext-dom": "*",
Expand Down Expand Up @@ -34,7 +34,7 @@
},
"config": {
"platform": {
"php": "5.4"
"php": "5.6"
},
"sort-packages": true
},
Expand Down
70 changes: 43 additions & 27 deletions composer.lock

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

2 changes: 1 addition & 1 deletion phpcs.xml
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@
</rule>

<!-- Include sniffs for PHP cross-version compatibility. -->
<config name="testVersion" value="5.4-"/>
<config name="testVersion" value="5.6-"/>
<rule ref="PHPCompatibilityWP">
<exclude-pattern>bin/*</exclude-pattern>
</rule>
Expand Down
2 changes: 1 addition & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Official AMP plugin, supported by the AMP team. Formerly Accelerated Mobile Page
**Tested up to:** 5.3.2
**Stable tag:** 1.4.2
**License:** [GPLv2 or later](http://www.gnu.org/licenses/gpl-2.0.html)
**Requires PHP:** 5.4
**Requires PHP:** 5.6

[![Build Status](https://travis-ci.org/ampproject/amp-wp.svg?branch=develop)](https://travis-ci.org/ampproject/amp-wp) [![Coverage Status](https://img.shields.io/codecov/c/github/ampproject/amp-wp/develop.svg)](https://codecov.io/gh/ampproject/amp-wp) [![Built with Grunt](https://gruntjs.com/cdn/builtwith.svg)](http://gruntjs.com)

Expand Down
2 changes: 1 addition & 1 deletion readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Tested up to: 5.3.2
Stable tag: 1.4.2
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Requires PHP: 5.4
Requires PHP: 5.6

Official AMP plugin, supported by the AMP team. Formerly Accelerated Mobile Pages, AMP enables great experiences across mobile, desktop, and stories.

Expand Down

0 comments on commit c03fd4f

Please sign in to comment.