Docs: "Custom Hydration Modes" code sample is deprecated #6559

Open
opened 2026-01-22 15:34:58 +01:00 by admin · 1 comment
Owner

Originally created by @ThomasLandauer on GitHub (Oct 28, 2020).

When following https://www.doctrine-project.org/projects/doctrine-orm/en/2.7/reference/dql-doctrine-query-language.html#custom-hydration-modes I'm getting:

Call to deprecated method fetchAll() of class Doctrine\DBAL\Driver\ResultStatement:
Use fetchAllNumeric(), fetchAllAssociative() or fetchFirstColumn() instead.

I wanted to fix it, but it looks like everything in ResultStatement is deprecated. So what's the new way of setting up a custom hydrator?

Originally created by @ThomasLandauer on GitHub (Oct 28, 2020). When following https://www.doctrine-project.org/projects/doctrine-orm/en/2.7/reference/dql-doctrine-query-language.html#custom-hydration-modes I'm getting: > Call to deprecated method fetchAll() of class Doctrine\DBAL\Driver\ResultStatement: Use fetchAllNumeric(), fetchAllAssociative() or fetchFirstColumn() instead. I wanted to fix it, but it looks like everything in [ResultStatement](https://github.com/doctrine/dbal/blob/2.12.x/lib/Doctrine/DBAL/Driver/ResultStatement.php) is deprecated. So what's the new way of setting up a custom hydrator?
admin added the DocumentationQuestion labels 2026-01-22 15:34:58 +01:00
Author
Owner

@webmasterMeyers commented on GitHub (Mar 17, 2021):

Was this ever figured out? as it says use fetchFirstColumn() but this function does not exist anywhere

@webmasterMeyers commented on GitHub (Mar 17, 2021): Was this ever figured out? as it says use `fetchFirstColumn()` but this function does not exist anywhere
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#6559