Skip to content

Commit 771b43d

Browse files
+ rollback some unexpected changes in previous commits
1 parent a28c84c commit 771b43d

File tree

7 files changed

+17
-21
lines changed

7 files changed

+17
-21
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
{ "name": "Andreas Braun", "email": "[email protected]" }
2323
],
2424
"require": {
25-
"php": "^8.1",
25+
"php": "^7.4 || ^8.0",
2626
"ext-mongodb": "^1.5",
2727
"doctrine/annotations": "^1.12",
2828
"doctrine/cache": "^1.11 || ^2.0",

lib/Doctrine/ODM/MongoDB/Configuration.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,8 @@ class Configuration
104104
* persistentCollectionGenerator?: PersistentCollectionGenerator,
105105
* persistentCollectionDir?: string,
106106
* persistentCollectionNamespace?: string,
107-
* repositoryFactory?: RepositoryFactory
107+
* repositoryFactory?: RepositoryFactory,
108+
* writeConcern?: WriteConcern
108109
* }
109110
*/
110111
private array $attributes = [];

lib/Doctrine/ODM/MongoDB/Iterator/CachingIterator.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
use Generator;
99
use RuntimeException;
1010
use Traversable;
11-
use ReturnTypeWillChange;
1211

1312
use function count;
1413
use function current;
@@ -80,7 +79,7 @@ public function toArray(): array
8079
/**
8180
* @return TValue|false
8281
*/
83-
#[ReturnTypeWillChange]
82+
#[\ReturnTypeWillChange]
8483
public function current()
8584
{
8685
return current($this->items);
@@ -89,7 +88,7 @@ public function current()
8988
/**
9089
* @return mixed
9190
*/
92-
#[ReturnTypeWillChange]
91+
#[\ReturnTypeWillChange]
9392
public function key()
9493
{
9594
return key($this->items);

lib/Doctrine/ODM/MongoDB/Iterator/HydratingIterator.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
use Iterator;
1111
use RuntimeException;
1212
use Traversable;
13-
use ReturnTypeWillChange;
1413

1514
/**
1615
* Iterator that wraps a traversable and hydrates results into objects
@@ -60,7 +59,7 @@ public function __destruct()
6059
/**
6160
* @return TDocument|null
6261
*/
63-
#[ReturnTypeWillChange]
62+
#[\ReturnTypeWillChange]
6463
public function current()
6564
{
6665
return $this->hydrate($this->getIterator()->current());
@@ -69,7 +68,7 @@ public function current()
6968
/**
7069
* @return mixed
7170
*/
72-
#[ReturnTypeWillChange]
71+
#[\ReturnTypeWillChange]
7372
public function key()
7473
{
7574
return $this->getIterator()->key();

lib/Doctrine/ODM/MongoDB/Iterator/PrimingIterator.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
use Doctrine\ODM\MongoDB\Mapping\ClassMetadata;
88
use Doctrine\ODM\MongoDB\Query\ReferencePrimer;
99
use Doctrine\ODM\MongoDB\UnitOfWork;
10-
use ReturnTypeWillChange;
1110

1211
use function is_callable;
1312
use function iterator_to_array;
@@ -62,7 +61,7 @@ public function toArray(): array
6261
/**
6362
* @return TValue|null
6463
*/
65-
#[ReturnTypeWillChange]
64+
#[\ReturnTypeWillChange]
6665
public function current()
6766
{
6867
$this->primeReferences();
@@ -78,7 +77,7 @@ public function next(): void
7877
/**
7978
* @return mixed
8079
*/
81-
#[ReturnTypeWillChange]
80+
#[\ReturnTypeWillChange]
8281
public function key()
8382
{
8483
return $this->iterator->key();

lib/Doctrine/ODM/MongoDB/Iterator/UnrewindableIterator.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
use LogicException;
99
use RuntimeException;
1010
use Traversable;
11-
use ReturnTypeWillChange;
1211

1312
use function iterator_to_array;
1413
use function sprintf;
@@ -61,7 +60,7 @@ public function toArray(): array
6160
/**
6261
* @return TValue|null
6362
*/
64-
#[ReturnTypeWillChange]
63+
#[\ReturnTypeWillChange]
6564
public function current()
6665
{
6766
return $this->getIterator()->current();
@@ -70,7 +69,7 @@ public function current()
7069
/**
7170
* @return mixed
7271
*/
73-
#[ReturnTypeWillChange]
72+
#[\ReturnTypeWillChange]
7473
public function key()
7574
{
7675
if ($this->iterator) {

lib/Doctrine/ODM/MongoDB/PersistentCollection/PersistentCollectionTrait.php

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
use Doctrine\ODM\MongoDB\UnitOfWork;
1414
use Doctrine\ODM\MongoDB\Utility\CollectionHelper;
1515
use Traversable;
16-
use ReturnTypeWillChange;
1716

1817
use function array_combine;
1918
use function array_diff_key;
@@ -410,7 +409,7 @@ public function getValues()
410409
/**
411410
* @return int
412411
*/
413-
#[ReturnTypeWillChange]
412+
#[\ReturnTypeWillChange]
414413
public function count()
415414
{
416415
// Workaround around not being able to directly count inverse collections anymore
@@ -438,7 +437,7 @@ public function isEmpty()
438437
* @return Traversable
439438
* @psalm-return Traversable<TKey, T>
440439
*/
441-
#[ReturnTypeWillChange]
440+
#[\ReturnTypeWillChange]
442441
public function getIterator()
443442
{
444443
$this->initialize();
@@ -537,7 +536,7 @@ public function __sleep()
537536
*
538537
* @return bool
539538
*/
540-
#[ReturnTypeWillChange]
539+
#[\ReturnTypeWillChange]
541540
public function offsetExists($offset)
542541
{
543542
$this->initialize();
@@ -551,7 +550,7 @@ public function offsetExists($offset)
551550
* @return mixed
552551
* @psalm-return T|null
553552
*/
554-
#[ReturnTypeWillChange]
553+
#[\ReturnTypeWillChange]
555554
public function offsetGet($offset)
556555
{
557556
$this->initialize();
@@ -565,7 +564,7 @@ public function offsetGet($offset)
565564
*
566565
* @return void
567566
*/
568-
#[ReturnTypeWillChange]
567+
#[\ReturnTypeWillChange]
569568
public function offsetSet($offset, $value)
570569
{
571570
if (! isset($offset)) {
@@ -582,7 +581,7 @@ public function offsetSet($offset, $value)
582581
*
583582
* @return void
584583
*/
585-
#[ReturnTypeWillChange]
584+
#[\ReturnTypeWillChange]
586585
public function offsetUnset($offset)
587586
{
588587
$this->doRemove($offset, true);

0 commit comments

Comments
 (0)