Skip to content

Commit

Permalink
Remove AbstractHydrator::hydrateRow()
Browse files Browse the repository at this point in the history
Signed-off-by: Alexander M. Turek <me@derrabus.de>
  • Loading branch information
derrabus committed Oct 4, 2021
1 parent 4b40223 commit 561469a
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 38 deletions.
11 changes: 8 additions & 3 deletions UPGRADE.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,14 @@ Using the `UUID` strategy for generating identifiers is not supported anymore.

## BC BREAK: Removed `Query::iterate()`

The deprecated methods `Query::iterate()` and `AbstractHydrator::iterate()`
have been removed along with the `IterableResult` class. Use `toIterable()`
instead.
The deprecated method `Query::iterate()` has been removed along with the
following classes and methods:

- `AbstractHydrator::iterate()`
- `AbstractHydrator::hydrateRow()`
- `IterableResult`

Use `toIterable()` instead.

# Upgrade to 2.11

Expand Down
33 changes: 0 additions & 33 deletions lib/Doctrine/ORM/Internal/Hydration/AbstractHydrator.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
use Doctrine\DBAL\Platforms\AbstractPlatform;
use Doctrine\DBAL\Result;
use Doctrine\DBAL\Types\Type;
use Doctrine\Deprecations\Deprecation;
use Doctrine\ORM\EntityManagerInterface;
use Doctrine\ORM\Events;
use Doctrine\ORM\Mapping\ClassMetadata;
Expand Down Expand Up @@ -183,38 +182,6 @@ public function hydrateAll(Result $stmt, object $resultSetMapping, array $hints
return $result;
}

/**
* Hydrates a single row returned by the current statement instance during
* row-by-row hydration with {@link toIterable()}.
*
* @deprecated
*
* @return mixed[]|false
*/
public function hydrateRow()
{
Deprecation::triggerIfCalledFromOutside(
'doctrine/orm',
'https://github.com/doctrine/orm/pull/9072',
'%s is deprecated.',
__METHOD__
);

$row = $this->statement()->fetchAssociative();

if ($row === false) {
$this->cleanup();

return false;
}

$result = [];

$this->hydrateRowData($row, $result);

return $result;
}

/**
* When executed in a hydrate() loop we have to clear internal state to
* decrease memory consumption.
Expand Down
2 changes: 0 additions & 2 deletions psalm.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@
<errorLevel type="suppress">
<!-- We're calling the deprecated method for BC here. -->
<file name="lib/Doctrine/ORM/Internal/SQLResultCasing.php"/>
<!-- Remove on 3.0.x -->
<referencedMethod name="Doctrine\ORM\Internal\Hydration\AbstractHydrator::hydrateRow"/>
</errorLevel>
</DeprecatedMethod>
<DocblockTypeContradiction>
Expand Down

0 comments on commit 561469a

Please sign in to comment.