DirectoryScanner icon indicating copy to clipboard operation
DirectoryScanner copied to clipboard

PHP 8.1 signatures deprecation

Open dereckson opened this issue 2 years ago • 1 comments

In PHP 8.1, signatures of classes inheriting from another class or implementing an interface must match return types.

For example:

Return type of TheSeer\DirectoryScanner\FilesOnlyFilterIterator::accept() should either be compatible with FilterIterator::accept(): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice

Previous partial fix doesn't seem to work, but perhaps it's straightforward to fix them, as the functions already return a boolean.

dereckson avatar May 08 '22 12:05 dereckson

I cannot reproduce this problem with PHP 8.1 on my box (PHP 8.1.5), neither using latest master or explicitly switching to 1.3.3

theseer avatar May 09 '22 09:05 theseer