You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -117,53 +116,61 @@ private function serializeCursorBasedPaginatedCollection(iterable $collection, a
117
116
thrownew \LogicException(sprintf('Collection returned by the collection data provider must implement %s or %s.', PaginatorInterface::class, PartialPaginatorInterface::class));
if (isset($selection['paginationInfo']['itemsPerPage'])) {
191
+
if (!($collectioninstanceof PartialPaginatorInterface)) {
192
+
thrownew \LogicException(sprintf('Collection returned by the collection data provider must implement %s to return itemsPerPage field.', PartialPaginatorInterface::class));
if (isset($selection['paginationInfo']['totalCount'])) {
197
+
if (!($collectioninstanceof PaginatorInterface)) {
198
+
thrownew \LogicException(sprintf('Collection returned by the collection data provider must implement %s to return totalCount field.', PaginatorInterface::class));
if (isset($selection['paginationInfo']['lastPage'])) {
203
+
if (!($collectioninstanceof PaginatorInterface)) {
204
+
thrownew \LogicException(sprintf('Collection returned by the collection data provider must implement %s to return lastPage field.', PaginatorInterface::class));
@@ -129,53 +129,61 @@ private function serializeCursorBasedPaginatedCollection(iterable $collection, a
129
129
thrownew \LogicException(sprintf('Collection returned by the collection data provider must implement %s or %s.', PaginatorInterface::class, PartialPaginatorInterface::class));
if (isset($selection['paginationInfo']['itemsPerPage'])) {
204
+
if (!($collectioninstanceof PartialPaginatorInterface)) {
205
+
thrownew \LogicException(sprintf('Collection returned by the collection data provider must implement %s to return itemsPerPage field.', PartialPaginatorInterface::class));
if (isset($selection['paginationInfo']['totalCount'])) {
210
+
if (!($collectioninstanceof PaginatorInterface)) {
211
+
thrownew \LogicException(sprintf('Collection returned by the collection data provider must implement %s to return totalCount field.', PaginatorInterface::class));
if (isset($selection['paginationInfo']['lastPage'])) {
216
+
if (!($collectioninstanceof PaginatorInterface)) {
217
+
thrownew \LogicException(sprintf('Collection returned by the collection data provider must implement %s to return lastPage field.', PaginatorInterface::class));
0 commit comments