Closed lordjancso closed 4 years ago
Do you think a sliding pagination makes sense in cli?
Since the sliding pagination is the only one in this bundle, I guess I have to use that.
And yeah, it makes sense. Why not? If I have a query and I want to paginate its big result I have to use the paginator. Does not matter if its cli or not.
I just trying to understand if we can add more paginations instead of adapting the existing one. Can you provide more context? For example, do you display some kind of "links" in your command output?
A new pagination would be. I have many commands with pagination and almost all of them paginates through a database table to create files by every "page" (for example sitemap xml files), or send email notifications or just maintain the database records.
It is much faster to paginate through large tables like this then query all the data at once.
I tried to implement a different paginator, but it's harder than I thought. Anyway, method should accept a null string to be consistent with phpdoc annotations, so we need to fix it
Hello!
I'm having this error since version 5.1 during pagination when I try to paginate in a Command. The SlidingPagination objects setUsedRoute function waits for a string, but in CLI that is null.
Argument 1 passed to Knp\Bundle\PaginatorBundle\Pagination\SlidingPagination::setUsedRoute() must be of the type string, null given, called in /app/vendor/knplabs/knp-paginator-bundle/src/Subscriber/SlidingPaginationSubscriber.php on line 54