Skip to content
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

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

Closed
wants to merge 2 commits into from
Closed
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": ">=5.6"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it proper to support php-5.6 version at least?

The php-5.6 and php-7.0 are unmaintained on official PHP team.

And the php-7.0 has been release for about three years.

If we want to keep the package e compatibility, I think we can let the package require php-7.0 version at least.

Copy link
Author

@hopeseekr hopeseekr May 15, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See? I debated that, too...

I figured if it was going from, literally, 5.0.0, maybe it'll be too much of a shock to active users, especially on legacy sites?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK but. I just started thinking... since this will be in effect a new project, I officially hard forked it to phpexpertsinc/chromephp and will be releasing a new composer package. It will definitely target PHP 7.0.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we can release two versions.

One is about supporting PHP 5.6.

Another one is about supporting PHP 7.1+.

This can be compatible with PHP 5 users.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's right.

I think releasing the new version is the proper way because original package has been inactive for about long time.

},
"autoload": {
"psr-0": {
Expand Down