-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
[Paginator] Fix regression when using Custom ID type #7903
Conversation
@ostrolucky this is basically what @Ocramius had in 39d2113 and then moved to the walker in c67a515. Which basically invalidades the changes in I'd still prefer to keep things contained in the |
It's not same. In 39d2113 was |
@ostrolucky you're right. However, I think this should have been solved by the hydrator already. I'm debugging it now. |
Thanks. Initially I wanted to just call getResult() in Paginator, but that didn't turn out to be easy. |
@ostrolucky it's related to this wonderful piece of code: // WARNING: BC break! We know this is the desired behavior to type convert values, but this
// erroneous behavior exists since 2.0 and we're forced to keep compatibility. The |
Yeah, I managed to solve this only by addressing the issue in I believe we should ensure that things are properly hydrated in the hydrator instead of pulling this responsibility to the paginator. Do you have any concerns @Ocramius @guilhermeblanco? |
I like that idea |
@ostrolucky Thank you for help :) |
Co-authored-by: Alexei Korolev <[email protected]>
Backported from 39d2113 Co-authored-by: Marco Pivetta <[email protected]>
Regression from fixing #7837
I have simplified the test case more. It doesn't have anything to do with custom walkers indeed. @lcobucci can we see your patch? |
Superseded by #7905 |
Continuation of #7890. Created new PR to clean the mess with huge diff, though I still left attributions via co-authors.
I have reused previous code from @Ocramius for getting id type, however if preferred, I can replace it with this smaller piece of code:
Please check if this approach is right one, as it's weird that we are now doing PHP<>DB conversions in both Paginator and WhereInWalker