mirror of
https://github.com/doctrine/orm.git
synced 2026-03-23 22:42:18 +01:00
Type error in Query.php #6846
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @akosphp on GitHub (Oct 4, 2021).
After upgrading to version 2.10.0 we are facing with the following error:
TypeError in file: Query.php on line 692
Message: Return value of Doctrine\ORM\Query::getMaxResults() must be of the type int or null, string returned
@derrabus commented on GitHub (Oct 4, 2021):
Most likely, this means that you call
setMaxResults()with a string somewhere.@YetiCGN commented on GitHub (Oct 5, 2021):
I think in most cases it's not userland code but another library. At least that's our problem with 2.10.0 and Sulu 2.3 at the moment. Or maybe it's a driver thing?
setMaxResults()isn't type-safe and doesn't throw a deprecation or other warning so I see why they would happily continue to set the property as a string.Edit: oic, #9079 is on the way to mitigate the problem. Thanks!