Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove AbstractHydrator::hydrateRow() #9076

Merged
merged 1 commit into from
Oct 4, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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
1 change: 0 additions & 1 deletion psalm.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
<!-- 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"/>
<referencedMethod name="Doctrine\ORM\Configuration::ensureProductionSettings"/>
</errorLevel>
</DeprecatedMethod>
Expand Down