bobthecow/psysh

Deprecated notices

SalesformNederland opened this issue · 2 comments

Hello,

Since upgrading to Laravel 9.* and PHP 8.1, we get Deprecated notices for this package. See the following. Is php 8.1 fully supported yet?

Deprecated: Return type of Psy\Readline\Hoa\IteratorRecursiveDirectory::getChildren() should either be compatible with RecursiveDirectoryIterator::getChildren(): RecursiveDirectoryIterator, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in ./vendor/psy/psysh/src/Readline/Hoa/IteratorRecursiveDirectory.php on line 100

Deprecated: Return type of Psy\Readline\Hoa\IteratorRecursiveDirectory::current() should either be compatible with FilesystemIterator::current(): SplFileInfo|FilesystemIterator|string, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in ./vendor/psy/psysh/src/Readline/Hoa/IteratorRecursiveDirectory.php on line 79

Deprecated: Return type of Psy\Readline\Hoa\IteratorFileSystem::current() should either be compatible with FilesystemIterator::current(): SplFileInfo|FilesystemIterator|string, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in ./vendor/psy/psysh/src/Readline/Hoa/IteratorFileSystem.php on line 73

Warning: "resource" is not a supported builtin type and will be interpreted as a class name. Write "\Psy\Readline\Hoa\resource" or import the class with "use" to suppress this warning in ./vendor/psy/psysh/src/Readline/Hoa/FileLinkRead.php on line 79

Yeah, it should be supported. It's a pain to track down all the deprecation notices, though :)

I'm not seeing any of these on PHP 8.1.6 with error reporting turned all the way up. What PHP version are you using?

I pushed a change 👆with fixes for the notices you mentioned. Happy to fix more if you see any.