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: vfsStreamDirectory::getIterator() incompatible with IteratorAggreate #258

Closed
othercorey opened this issue Jul 25, 2021 · 0 comments

Comments

@othercorey
Copy link

A new php 8.1 warning about incompatible return types.

PHP Fatal error:  During inheritance of IteratorAggregate: Uncaught Return type of org\bovigo\vfs\vfsStreamDirectory::getIterator() should either be compatible with IteratorAggregate::getIterator(): Traversable, or the #[ReturnTypeWillChange] attribute should be used to temporarily suppress the notice

/home/runner/work/cakephp/cakephp/vendor/mikey179/vfsstream/src/main/php/org/bovigo/vfs/vfsStreamDirectory.php:248
/home/runner/work/cakephp/cakephp/vendor/mikey179/vfsstream/src/main/php/org/bovigo/vfs/vfsStreamDirectory.php:16
/home/runner/work/cakephp/cakephp/vendor/mikey179/vfsstream/src/main/php/org/bovigo/vfs/vfsStream.php:360
/home/runner/work/cakephp/cakephp/vendor/mikey179/vfsstream/src/main/php/org/bovigo/vfs/vfsStream.php:167

I would have opened a PR, but wasn't sure if you wanted to change the return type or suppress the warning.

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

No branches or pull requests

2 participants