[Paginator] Fix regression when using Custom ID type#7903
[Paginator] Fix regression when using Custom ID type#7903ostrolucky wants to merge 3 commits intodoctrine:2.6from ostrolucky:7890-paginator-objecti
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 :) |
|
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