Bug #104497
open[Bug] in QueryBuilder::setMaxResults()
0%
Description
It is documented for 12.4 that using ->setMaxResults(null)
in QueryBuilder will return all results.
See: https://docs.typo3.org/m/typo3/reference-coreapi/12.4/en-us/ApiOverview/Database/QueryBuilder/Index.html#setmaxresults-and-setfirstresult
But doing so results in this error message:Uncaught TYPO3 Exception TYPO3\CMS\Core\Database\Query\QueryBuilder::setMaxResults(): Argument #1 ($maxResults) must be of type int, null given, called in ...
Is this a core bug or a documentation bug?
In main
it seems to be implemented because the method signature is public function setMaxResults(?int $maxResults = null): QueryBuilder
.
Updated by Garvin Hicking 6 months ago
- Category set to Database API (Doctrine DBAL)
- Status changed from New to Needs Feedback
- Assignee set to Stefan Bürk
Hi Stefan,
Putting this on your tab to ponder about whether what was talked about in slack is useful - adding a layer on top of this to allow 0/null both, to foster a v13 deprecation instead of a hard BC in v13.
Feel free to unassign, or let me know how you want this to move forward.