Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PHP 8.1 signatures deprecation #11

Open
dereckson opened this issue May 8, 2022 · 1 comment
Open

PHP 8.1 signatures deprecation #11

dereckson opened this issue May 8, 2022 · 1 comment

Comments

@dereckson
Copy link

dereckson commented May 8, 2022

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 added a commit to dereckson/DirectoryScanner that referenced this issue May 8, 2022
@theseer
Copy link
Owner

theseer commented May 9, 2022

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants