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

Exception when calling toIterable without parameters #8575

Closed
flack opened this issue Mar 30, 2021 · 3 comments
Closed

Exception when calling toIterable without parameters #8575

flack opened this issue Mar 30, 2021 · 3 comments
Milestone

Comments

@flack
Copy link
Contributor

flack commented Mar 30, 2021

I'm calling Doctrine\ORM\Query::toIterable() without any parameters like this:

$resultset = $query->toIterable();

This produces the following exception:

TypeError: Argument 1 passed to Doctrine\ORM\Internal\Hydration\AbstractHydrator::toIterable() must implement interface Doctrine\DBAL\Driver\Statement, instance of Doctrine\DBAL\ForwardCompatibility\Result given, called in vendor/doctrine/orm/lib/Doctrine/ORM/AbstractQuery.php on line 1010

The code used to work fine with the iterate() method, but I wanted to replace it with the new version, since it's deprecated. If I downgrade doctrine/dbal to 2.12.1, everything works. With 2.13.0 it breaks. Not sure if this means I should rather open a ticket for doctrine/dbal?

flack added a commit to flack/midgard-portable that referenced this issue Mar 30, 2021
kbond added a commit to kbond/skunkworks that referenced this issue Mar 30, 2021
@derrabus
Copy link
Member

I have the same issue here. This is a blocker for upgrading to DBAL 2.13 for us.

@beberlei
Copy link
Member

beberlei commented Apr 1, 2021

Fixed with #8495 already, not released yet - will be in 2.8.3

@beberlei beberlei closed this as completed Apr 1, 2021
@beberlei beberlei added this to the 2.8.3 milestone Apr 1, 2021
flack added a commit to flack/midgard-portable that referenced this issue Apr 1, 2021
@flack
Copy link
Contributor Author

flack commented Apr 1, 2021

@beberlei awesome, thanks for the quick fix!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants