php-debugbar icon indicating copy to clipboard operation
php-debugbar copied to clipboard

Php8 1 fixes

Open phpfui opened this issue 3 years ago • 3 comments

PHP 8.1 has depreciated mismatched return types on method overloads. I added appropriate return types when they were compatible with 7.1, and #[\ReturnTypeWillChange] where mixed types were returned, which are not compatible with 7.1.

I also had to update the unit tests to work better under Windows and fixed more warnings from the unit tests. These fixes may actually be in another PR already.

I also typed a few parameters in the modified files where it made sense to continue improving the code base. And I updated the composer.json file to support PHPUnit 8 and removed allowing PHP 8.2 and higher from working.

This code now runs on my 8.1 server with no issues, but there may still be more 8.1 fixes needed, as my use case is probably pretty limited.

phpfui avatar Jan 14 '22 15:01 phpfui

Since this package only supports PHP 7.1 and higher (yeah, good call to no longer support 7.0 and lower), I removed the old symfony/var-dumper versions that support the older PHP versions. Since we no longer need to support the older versions with a backport, I removed the locally copied class DebugBar\DataFormatter\VarDumper\SeekingData, as we should be able use the official version, as this is where the old class was copied from.

phpfui avatar Feb 09 '22 23:02 phpfui

Where are we with this PR? Do you plan to support 8.1?

phpfui avatar Apr 06 '22 02:04 phpfui

Any updates on this? Why are we not merging?

rikgirbes avatar Jul 14 '22 09:07 rikgirbes