From 2569c3e813e19b26a0cdef086067c1856f1e1be0 Mon Sep 17 00:00:00 2001 From: "Theodore R. Smith" Date: Tue, 14 May 2019 21:35:09 -0500 Subject: [PATCH] Removed support for incredibly dead and buried versions of PHP. Only support PHP 5.6 and later. --- ChromePhp.php | 14 +++----------- composer.json | 2 +- 2 files changed, 4 insertions(+), 12 deletions(-) diff --git a/ChromePhp.php b/ChromePhp.php index 3ea92de..ce4bf86 100755 --- a/ChromePhp.php +++ b/ChromePhp.php @@ -126,7 +126,7 @@ class ChromePhp */ private function __construct() { - $this->_timestamp = version_compare(PHP_VERSION, '5.1') >= 0 ? $_SERVER['REQUEST_TIME'] : time(); + $this->_timestamp = $_SERVER['REQUEST_TIME']; $this->_json['request_uri'] = $_SERVER['REQUEST_URI']; } @@ -311,16 +311,8 @@ protected function _convert($object) continue; } $type = $this->_getPropertyKey($property); - - if (version_compare(PHP_VERSION, '5.3') >= 0) { - $property->setAccessible(true); - } - - try { - $value = $property->getValue($object); - } catch (ReflectionException $e) { - $value = 'only PHP 5.3 can access private/protected properties'; - } + $property->setAccessible(true); + $value = $property->getValue($object); // same instance as parent object if ($value === $object || in_array($value, $this->_processed, true)) { diff --git a/composer.json b/composer.json index dc16853..c6b3b37 100644 --- a/composer.json +++ b/composer.json @@ -14,7 +14,7 @@ } ], "require": { - "php": ">=5.0.0" + "php": ">=7.0" }, "autoload": { "psr-0": {