Skip to content

Commit

Permalink
PHP 8.0: ReflectionParameter::getClass()), ::isArray(), and ::isCalla…
Browse files Browse the repository at this point in the history
…ble() methods deprecated
  • Loading branch information
jameelmoses committed Jun 2, 2021
1 parent 3891d23 commit 7d48bd9
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "jameelmoses/wordpress-kint-debugger",
"version": "1.0.0",
"version": "1.0.1",
"description": "WordPress Kint Debugger is a simple wrapper for Kint, a debugging tool to output information about variables and traces in a styled, collapsible format that makes understanding deep arrays and objects easier.",
"keywords": [
"WP",
Expand Down
2 changes: 1 addition & 1 deletion kint-debugger.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Plugin Name: WordPress Kint Debugger
* Plugin URI: https://github.com/jameelmoses/wordpress-kint-debugger
* Description: Dump variables and traces in an organized and interactive display. Works with Debug Bar.
* Version: 1.0.0
* Version: 1.0.1
* Author: Jameel Moses
* Author URI: https://github.com/jameelmoses
* Requires: 2.5 or higher
Expand Down
6 changes: 3 additions & 3 deletions vendor/kint/parsers/custom/classmethods.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@ protected function _parse( &$variable )
foreach ( $method->getParameters() as $param ) {
$paramString = '';

if ( $param->isArray() ) {
if ( $param->getType() && $param->getType()->getName() === 'array' ) {
$paramString .= 'array ';
} else {
try {
if ( $paramClassName = $param->getClass() ) {
if ( $paramClassName = ( $param->getType() && !$param->getType()->isBuiltin() ) ? new ReflectionClass($param->getType()->getName()) : null ) {
$paramString .= $paramClassName->name . ' ';
}
} catch ( ReflectionException $e ) {
Expand Down Expand Up @@ -147,4 +147,4 @@ protected function _parse( &$variable )
$this->type = 'Available methods';
$this->size = count( self::$cache[ $className ] );
}
}
}

0 comments on commit 7d48bd9

Please sign in to comment.