From 0df5ee4dc92de1dd3013a7c5cb22332cd9b9939a Mon Sep 17 00:00:00 2001 From: ADmad Date: Wed, 30 Aug 2017 18:31:22 +0530 Subject: [PATCH 1/3] Rename Object to BaseObject. "Object" is a protected keyword in PHP 7.2 --- src/Action/BaseAction.php | 4 ++-- src/Core/{Object.php => BaseObject.php} | 2 +- src/Listener/BaseListener.php | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) rename src/Core/{Object.php => BaseObject.php} (95%) diff --git a/src/Action/BaseAction.php b/src/Action/BaseAction.php index 9a827f965..ad0f01956 100644 --- a/src/Action/BaseAction.php +++ b/src/Action/BaseAction.php @@ -6,7 +6,7 @@ use Cake\Utility\Hash; use Cake\Utility\Inflector; use Cake\Utility\Text; -use Crud\Core\Object; +use Crud\Core\BaseObject; use Crud\Event\Subject; /** @@ -15,7 +15,7 @@ * Licensed under The MIT License * For full copyright and license information, please see the LICENSE.txt */ -abstract class BaseAction extends Object +abstract class BaseAction extends BaseObject { /** diff --git a/src/Core/Object.php b/src/Core/BaseObject.php similarity index 95% rename from src/Core/Object.php rename to src/Core/BaseObject.php index b0c83616e..ada1dcb12 100644 --- a/src/Core/Object.php +++ b/src/Core/BaseObject.php @@ -13,7 +13,7 @@ * Licensed under The MIT License * For full copyright and license information, please see the LICENSE.txt */ -abstract class Object implements EventListenerInterface +abstract class BaseObject implements EventListenerInterface { use InstanceConfigTrait; diff --git a/src/Listener/BaseListener.php b/src/Listener/BaseListener.php index f37b159e9..746e44ac6 100644 --- a/src/Listener/BaseListener.php +++ b/src/Listener/BaseListener.php @@ -1,7 +1,7 @@ Date: Wed, 30 Aug 2017 18:35:39 +0530 Subject: [PATCH 2/3] Add backwards compatibility for BaseObject --- src/Core/Object.php | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 src/Core/Object.php diff --git a/src/Core/Object.php b/src/Core/Object.php new file mode 100644 index 000000000..43c963b57 --- /dev/null +++ b/src/Core/Object.php @@ -0,0 +1,5 @@ + Date: Wed, 30 Aug 2017 18:36:29 +0530 Subject: [PATCH 3/3] Run tests on PHP 7.2 --- .travis.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index e2bcc4a65..eeb773852 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,6 +5,7 @@ php: - 5.6 - 7.0 - 7.1 + - 7.2 sudo: false @@ -27,7 +28,7 @@ matrix: env: PHPSTAN=1 DEFAULT=0 before_script: - - if [[ $TRAVIS_PHP_VERSION != 7.0 ]]; then phpenv config-rm xdebug.ini; fi + - if [[ $TRAVIS_PHP_VERSION != 7.0 && $TRAVIS_PHP_VERSION != 7.2 ]]; then phpenv config-rm xdebug.ini; fi - if [[ $TRAVIS_PHP_VERSION = 5.5 ]]; then composer require --dev friendsofcake/search:^3.0; fi - if [[ $TRAVIS_PHP_VERSION != 5.5 ]]; then composer install --prefer-dist --no-interaction; fi