-
Notifications
You must be signed in to change notification settings - Fork 141
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 PHP 7.4 deprecation, when using objects with paginate() on Paginator #295
Conversation
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.
Can you add a test that is supposed to fail with the previous version?
Yes, will do |
It seems like, the issue only happens with custom EventSubscribers. The existing ones are using slice, which is transforming the object into an array. This means the deprecation message will never show up. |
I think that we should |
Sorry for my late response. Should I change my code to not use |
Don't worry about the delay, there's no hurry. |
Any news on this? |
Sorry, I was busy... |
So before this condition (https://github.com/KnpLabs/knp-components/blob/master/src/Knp/Component/Pager/Paginator.php#L91) there should be a check, whether |
The latest version already restricts the type of $items to |
I'm closing this since we don't support PHP 7.4 anymore |
Details see #294