Skip to content

Commit 93fe8c1

Browse files
committed
Support ReadableCollection from doctrine/collections 1.8.0
1 parent aa483a2 commit 93fe8c1

File tree

3 files changed

+19
-1
lines changed

3 files changed

+19
-1
lines changed

extension.neon

+1
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ parameters:
3434
- stubs/RepositoryFactory.stub
3535
- stubs/Collections/ArrayCollection.stub
3636
- stubs/Collections/Collection.stub
37+
- stubs/Collections/ReadableCollection.stub
3738
- stubs/Collections/Selectable.stub
3839
- stubs/ORM/AbstractQuery.stub
3940
- stubs/ORM/Mapping/ClassMetadata.stub

stubs/Collections/Collection.stub

+2-1
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,9 @@ use IteratorAggregate;
1111
* @template T
1212
* @extends IteratorAggregate<TKey, T>
1313
* @extends ArrayAccess<TKey|null, T>
14+
* @extends ReadableCollection<TKey, T>
1415
*/
15-
interface Collection extends Countable, IteratorAggregate, ArrayAccess
16+
interface Collection extends Countable, IteratorAggregate, ArrayAccess, ReadableCollection
1617
{
1718

1819
}
+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<?php
2+
3+
namespace Doctrine\Common\Collections;
4+
5+
use Countable;
6+
use IteratorAggregate;
7+
8+
/**
9+
* @template TKey of array-key
10+
* @template-covariant T
11+
* @extends IteratorAggregate<TKey, T>
12+
*/
13+
interface ReadableCollection extends Countable, IteratorAggregate
14+
{
15+
16+
}

0 commit comments

Comments
 (0)