-
-
Notifications
You must be signed in to change notification settings - Fork 20
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
Fix invalid call to SerializableLimitIterator's constructor #56
base: 2.18.x
Are you sure you want to change the base?
Conversation
Signed-off-by: arhimede <[email protected]>
src/SerializableLimitIterator.php
Outdated
$this->__construct($data['it'], $data['offset'], $data['count']); | ||
$this->seek($data['pos'] + $data['offset']); | ||
$this->offset = (int) $data['offset']; | ||
$this->count = (int) $data['count']; | ||
parent::__construct($data['it'], $this->offset, $this->count); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any way we can test how it was broken before? 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Besides the constructor and Psalm: the call of seek
has been removed without any effect, which indicates that tests are missing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oops, missing seek issue is fixed now
Signed-off-by: arhimede <[email protected]>
Description
This pull request fixes an error identified by Psalm during the validation of
src/SerializableLimitIterator.php
:The error is caused by a direct call to
SerializableLimitIterator
's constructor from its__unserialize
method.