yiisoft / yii2-debug

Debug Extension for Yii 2
http://www.yiiframework.com
BSD 3-Clause "New" or "Revised" License
201 stars 149 forks source link

class_exists php 8.1 #477

Closed enriquemolinari closed 2 years ago

enriquemolinari commented 2 years ago

What steps will reproduce the problem?

Create a new Yii2 project with latest version (2.0.45), with the debug toolbar enabled.

What's expected?

Just see the debug toolbar

What do you get instead?

PHP Deprecated Warning – yii\base\ErrorException class_exists(): Passing null to parameter #1 ($class) of type string is deprecated in /var/www/html/busquedatexto/vendor/yiisoft/yii2-debug/src/panels/UserPanel.php line 91

Additional info

Q A
Yii version 2.0.45
PHP version 8.1
Operating system Ubuntu
Aevis commented 2 years ago

The latest tagged version 2.1.18 of yii2-debug isn't fully compatible with php 8.1 yet, see milestone 2.1.19. This specific deprecation should be fixed in the master branch, see https://github.com/yiisoft/yii2-debug/issues/465.

As of now, we can either use the master branch, disable the debug toolbar or wait for the 2.1.9 release.