Skip to content

Commit a8043b3

Browse files
committed
Update min PHP version & dev-lib
1 parent 8de86a3 commit a8043b3

File tree

3 files changed

+10
-16
lines changed

3 files changed

+10
-16
lines changed

.travis.yml

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,7 @@
1-
# Tell Travis CI we're using PHP
21
language: php
32

4-
# Opt to use Travis container-based environment.
53
sudo: false
64

7-
# Newer versions like trusty don't have PHP 5.2 or 5.3
8-
# https://blog.travis-ci.com/2017-07-11-trusty-as-default-linux-is-coming
9-
dist: precise
10-
115
notifications:
126
email:
137
on_success: never
@@ -20,6 +14,7 @@ cache:
2014
- $HOME/phpunit-bin
2115

2216
php:
17+
- 5.6
2318
- 7.2
2419

2520
env:

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"license": "GPLv2",
77
"prefer-stable" : true,
88
"require": {
9-
"php": ">=5.3"
9+
"php": ">=5.6.20"
1010
},
1111
"require-dev": {
1212
"brainmaestro/composer-git-hooks": "^2.6.0",
@@ -16,7 +16,7 @@
1616
"php-coveralls/php-coveralls": "^2.1",
1717
"slowprog/composer-copy-file": "0.2.1",
1818
"wp-coding-standards/wpcs": "*",
19-
"xwp/wp-dev-lib": "^1.0.0"
19+
"xwp/wp-dev-lib": "^1.1.1"
2020
},
2121
"scripts": {
2222
"phpcs": [

jwt-auth.php

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -26,16 +26,15 @@
2626
define( 'JWT_AUTH_VERSION', '0.1' );
2727

2828
/**
29-
* Requires running PHP 5.3 or above.
29+
* Requires running PHP 5.6.20 or above.
3030
*
3131
* @since 0.1
3232
* @codeCoverageIgnore
3333
*/
3434
function jwt_auth_version_check() {
35-
36-
if ( version_compare( PHP_VERSION, '5.3', '<' ) ) {
35+
if ( version_compare( PHP_VERSION, '5.6.20', '<' ) ) {
3736
deactivate_plugins( plugin_basename( __FILE__ ) );
38-
wp_die( esc_html__( 'The JWT Auth plugin requires PHP Version 5.3 or above.', 'jwt-auth' ) );
37+
wp_die( esc_html__( 'The JWT Auth plugin requires PHP Version 5.6.20 or above.', 'jwt-auth' ) );
3938
}
4039
}
4140
add_action( 'admin_init', 'jwt_auth_version_check' );
@@ -47,18 +46,18 @@ function jwt_auth_version_check() {
4746
*/
4847
function jwt_auth_loader() {
4948

50-
/** JWT Classes */
49+
// JWT Classes.
5150
foreach ( glob( JWT_AUTH_PLUGIN_DIR . '/wp-includes/rest-api/auth/jwt/*.php' ) as $filename ) {
5251
require_once $filename;
5352
}
5453

55-
/** WP_REST_Token Class */
54+
// WP_REST_Token Class.
5655
require_once JWT_AUTH_PLUGIN_DIR . '/wp-includes/rest-api/auth/class-wp-rest-token.php';
5756

58-
/** WP_REST_Key_Pair Class */
57+
// WP_REST_Key_Pair Class.
5958
require_once JWT_AUTH_PLUGIN_DIR . '/wp-includes/rest-api/auth/class-wp-rest-key-pair.php';
6059

61-
/** WP_Key_Pair_List_Table Class */
60+
// WP_Key_Pair_List_Table Class.
6261
require_once JWT_AUTH_PLUGIN_DIR . '/wp-admin/includes/class-wp-key-pair-list-table.php';
6362

6463
// Initialize JSON Web Tokens.

0 commit comments

Comments
 (0)