Skip to content

Conversation

royarisse
Copy link

Fix: Remove optional arguments before required arguments.
Fix: Return types for Walker.

Fix: Remove optional arguments before required arguments.
Fix: Return types for Walker.
* @link http://php.net/manual/en/iterator.current.php
*/
public function current()
public function current(): mixed
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I understand that in PHP 8.1 (or even in PHP 8.0) the Iterator interface method signatures were changed. Due to that change, I see no way to have the same iterator class declaration, that will satisfy every supported PHP version (5.x, 7.x, 8.x).

Do you see any way to make this work?

P.S.
This code changes causes lot of builds to fail.

@aik099
Copy link
Member

aik099 commented Jan 2, 2025

All, except for the iterator-related changes was done in the #226.

@aik099 aik099 added this to the v2.0.1 milestone Jan 4, 2025
@aik099 aik099 added the type-bug label Jan 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants