Closed VincentLanglet closed 3 years ago
Pager has bugs. Please use Doctrine Paginator
Pager has bugs. Please use Doctrine Paginator
count() allows to implements Countable, but how is it clear to know if it's the count of pages or the count of results ?
yeah I also find that confusing. I would vote for countResults
.
count() allows to implements Countable, but how is it clear to know if it's the count of pages or the count of results ?
yeah I also find that confusing. I would vote for
countResults
.
Do you want to provide the PR @dmaicher ? :)
I would also vote 🗳 for countResults()
I checked a bit and this will not be sooo easy to deprecate in a clean way on 3.x.
Everywhere we call ->getNbResults()
we need to check if the method countResults()
exists and if not trigger a deprecation? We also call that method in twig templates :confused:
After all people could have their own PagerInterface
implementations.
EDIT: and this also affects (seems that is just some hack to test setNbResults
getNbResults()
? its protected
Cf https://github.com/sonata-project/SonataAdminBundle/pull/6541#discussion_r532515190 And https://github.com/sonata-project/SonataAdminBundle/pull/6541#discussion_r543306726
@sonata-project/contributors Let's discuss about the name, current options are