mirror of
https://github.com/doctrine/orm.git
synced 2026-03-23 22:42:18 +01:00
[PR #9079] Add integer cast in setMaxResults methods of Query and QueryBuilder #11359
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?
Original Pull Request: https://github.com/doctrine/orm/pull/9079
State: closed
Merged: Yes
Hello there 👋
This is my first PR here 😁 Hope, I have done it right.
With version 2.9.6 a native return type was added to the
Doctrine\ORM\Query::getMaxResults()method.To prevent type errors in userland due to wrong usage, an integer cast while setting the max result property was added.
Alternatively a native type to the parameter could be set. But I don't know, if this would be breaking.
Psalm is failing due to a redundant cast, which is obvious 🙈
Nevertheless I wanted to hear you opinions, whether this could be merged or if I need to fix our 50+ wrong usages 😬
Best regards 🙂