Gives Undefined index: collection_operation_name.
Bug is in recent master and in 2.4 version. v2.3.6 works fine.
in src/Hydra/Serializer/PartialCollectionViewNormalizer.php if you replace line
$isPaginatedWithCursor = $paginated && null !== $metadata && null !== $cursorPaginationAttribute = $metadata->getCollectionOperationAttribute($context['collection_operation_name'], 'pagination_via_cursor', null, true);
with
$isPaginatedWithCursor = $paginated && null !== $metadata && null !== $cursorPaginationAttribute = $metadata->getCollectionOperationAttribute($context['collection_operation_name'] ?? $context['subresource_operation_name'], 'pagination_via_cursor', null, true);
it starts to work, though there are some other pagination bugs since 2.4, which I will post separately.
this fix looks correct, may you open a PR?
@soyuka I created the PR. I was wrong, looks like the bug is only in master currently.
thanks!
Most helpful comment
thanks!