Skip to content

Try to fix Simple pager#1425

Merged
VincentLanglet merged 3 commits into
sonata-project:3.xfrom
VincentLanglet:simplePager
May 2, 2021
Merged

Try to fix Simple pager#1425
VincentLanglet merged 3 commits into
sonata-project:3.xfrom
VincentLanglet:simplePager

Conversation

@VincentLanglet
Copy link
Copy Markdown
Member

@VincentLanglet VincentLanglet commented Apr 25, 2021

Subject

I am targeting this branch, because bugfix.
It could technically be considered as a BC-break since execute method is now returning a Paginator instead of an array. But the phpdoc were saying mixed so I don't think there is a real BC-promise about the returning value.
It's still Countable and Traversable, and this is the only solution I found.

Closes #1403.

Changelog

### Changed
- `ProxyQuery::execute()` is now returning a Paginator instead of an array.

### Fixed
- Support for fetch join with simple pager.

@VincentLanglet
Copy link
Copy Markdown
Member Author

\count($this->getQuery()->execute()) is technically not always allowed.
Need some discussions about sonata-project/SonataAdminBundle#7112.

But @franmomu can you tried my fix on your project ?

@franmomu
Copy link
Copy Markdown
Member

But @franmomu can you tried my fix on your project ?

👍 looks like it works fine

@VincentLanglet VincentLanglet requested a review from a team April 25, 2021 19:14
@VincentLanglet VincentLanglet marked this pull request as ready for review April 25, 2021 19:14
@VincentLanglet
Copy link
Copy Markdown
Member Author

Please review @sonata-project/contributors

franmomu and others added 3 commits May 2, 2021 14:46
It checks that the number of results from Pager must be the same as
using Simple Pager
@VincentLanglet
Copy link
Copy Markdown
Member Author

I also like to release this bugfix @dmaicher

@VincentLanglet VincentLanglet merged commit 4555002 into sonata-project:3.x May 2, 2021
@VincentLanglet VincentLanglet deleted the simplePager branch May 2, 2021 13:06
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.

Wrong results with simple pager after 3.31

3 participants