Skip to content

Removed support for incredibly dead and buried versions of PHP. #74

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 3 additions & 17 deletions ChromePhp.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,11 +78,6 @@ class ChromePhp
*/
const TABLE = 'table';

/**
* @var string
*/
protected $_php_version;

/**
* @var int
*/
Expand Down Expand Up @@ -131,8 +126,7 @@ class ChromePhp
*/
private function __construct()
{
$this->_php_version = phpversion();
$this->_timestamp = $this->_php_version >= 5.1 ? $_SERVER['REQUEST_TIME'] : time();
$this->_timestamp = $_SERVER['REQUEST_TIME'];
$this->_json['request_uri'] = $_SERVER['REQUEST_URI'];
}

Expand Down Expand Up @@ -317,16 +311,8 @@ protected function _convert($object)
continue;
}
$type = $this->_getPropertyKey($property);

if ($this->_php_version >= 5.3) {
$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