Skip to content

Commit

Permalink
Add support for the readable collection interface from doctrine/colle…
Browse files Browse the repository at this point in the history
…ctions (Fix #56)
  • Loading branch information
mbabker committed Aug 13, 2024
1 parent b4a33ad commit bb9b6a5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## 4.7.0 (2024-??-??)

- [#56](https://github.com/BabDev/Pagerfanta/issues/56) Add support for `Doctrine\Common\Collections\ReadableCollection` in `Pagerfanta\Doctrine\Collections\CollectionAdapter`

## 4.6.0 (2024-05-29)

- Add support for `ruflin/elastica` 8.x
Expand Down
6 changes: 3 additions & 3 deletions lib/Adapter/Doctrine/Collections/CollectionAdapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace Pagerfanta\Doctrine\Collections;

use Doctrine\Common\Collections\Collection;
use Doctrine\Common\Collections\ReadableCollection;
use Pagerfanta\Adapter\AdapterInterface;

/**
Expand All @@ -16,10 +16,10 @@
class CollectionAdapter implements AdapterInterface
{
/**
* @param Collection<TKey, T> $collection
* @param ReadableCollection<TKey, T> $collection
*/
public function __construct(
private readonly Collection $collection,
private readonly ReadableCollection $collection,
) {}

/**
Expand Down

0 comments on commit bb9b6a5

Please sign in to comment.