Skip to content

Commit

Permalink
Removed support for incredibly dead and buried versions of PHP.
Browse files Browse the repository at this point in the history
Only support PHP 5.6 and later.
  • Loading branch information
hopeseekr committed May 15, 2019
1 parent 4792146 commit 1cbd996
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 12 deletions.
14 changes: 3 additions & 11 deletions ChromePhp.php
Original file line number Diff line number Diff line change
Expand Up @@ -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'];
}

Expand Down Expand Up @@ -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)) {
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
}
],
"require": {
"php": ">=5.0.0"
"php": ">=7.0"
},
"autoload": {
"psr-0": {
Expand Down

0 comments on commit 1cbd996

Please sign in to comment.