KnpLabs / knp-components

Various component pack, includes paginator
MIT License
751 stars 141 forks source link

No items when iterating the Paginator object with Solarium in PHP 8 #308

Closed marijnotte closed 2 years ago

marijnotte commented 2 years ago

When using Solarium on PHP 8 the paginator doesn't return items when iterating. (the getItems() functions returns the items, so the items have been successfully fetched)

We did a workaround in our (open source) application by converting the result to an array: https://bitbucket.org/eactive/integrated/commits/58a75a572fe7f35165b54682a2b38ba1263e2934

The easiest solution might be to do an iterator_to_array in the SolariumQuerySubscriber

garak commented 2 years ago

Do you mind proposing a Pull request?