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: Incompatibility with IteratorAggregate::getIterator #151

Closed
boesing opened this issue Jul 22, 2021 · 2 comments · Fixed by #157
Closed

PHP 8.1: Incompatibility with IteratorAggregate::getIterator #151

boesing opened this issue Jul 22, 2021 · 2 comments · Fixed by #157
Labels
Bug Something isn't working

Comments

@boesing
Copy link
Member

boesing commented Jul 22, 2021

Bug Report

Q A
Version(s) latest

Summary

The Fieldset implementation has an incompatibility with the IteratorAggregate::getIterator.

Current behavior

Tests are failing.

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

How to reproduce

Execute tests with PHP 8.1

Expected behavior

Tests are passing.

@boesing boesing added the Bug Something isn't working label Jul 22, 2021
@tobias-trozowski
Copy link
Contributor

tobias-trozowski commented Nov 27, 2021

test fixed with #128

Bumping

  • laminas/laminas-stdlib to ^3.6.1
  • laminas/laminas-captcha to ^2.11.0
  • laminas/laminas-session to ^2.12.0
  • phpunit/phpunit to ^9.5.8
    will make the tests pass as long as dependencies installed with --ignore-platform-req=php.

dependencies not supporting php 8.1 right now

  • laminas/laminas-inputfilter
  • laminas/laminas-recaptcha
  • laminas/laminas-filter

Would it make any sense to add --ignore-platform-req=php for php 8.1 as only dev-deps are affected?

@Ocramius
Copy link
Member

Yes, see how other components already do that 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants