Review main Merged

53409[BUGFIX] Make Extbase pagination work with QueryBuilder queries

Tymoteusz Motylewski CR +2 V +2 Easy +23 −3 updated 09/18/17, 07:09

Commit message

Now you can pass a query built by QueryBuilder to $query->statement(),
and use the QueryResult for pagination.

So inside repository you can create custom query like:

$queryBuilder->select('*')->...
$query = $this->createQuery();
$query->statement($queryBuilder);
return $query->execute();

and pass the result to paginate ViewHelper.

Review

  • Code review CR +2
    • Christian Kuhn +2
    • Stefan Neufeind +1
    • Wouter Wolters +1
    • Anja Leichsenring +1
    • Andreas Kienast +1
  • Verified V +2
    • Christian Kuhn +2
    • Joerg Kummer +1
    • Anja Leichsenring +1
    • TYPO3com +1 CI

Issues 1

Files 3

Review log 2838

Show 813 earlier messages
  1. Tymoteusz Motylewski uploaded patch set 1 07/05/17, 11:30

  2. TYPO3com voted on patch set 1 V -1 07/05/17, 11:30 Completed build in 09s on Wed, 5 Jul, 01:30 PM Test Summary: No tests found Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-13020

  3. Tymoteusz Motylewski uploaded patch set 2 07/05/17, 11:36

  4. TYPO3com voted on patch set 2 V -1 07/05/17, 11:46 Completed build in 10m 10s on Wed, 5 Jul, 01:46 PM Test Summary: 48 of 57127 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-13021

  5. Tymoteusz Motylewski commented on patch set 2 07/08/17, 16:10

    I've extracted the cloning part to the separate patch: https://review.typo3.org/#/c/53424/
  6. Tymoteusz Motylewski uploaded patch set 3 07/15/17, 20:45

  7. TYPO3com voted on patch set 3 V -1 07/15/17, 20:55 Completed build in 10m 43s on Sat, 15 Jul, 10:55 PM Test Summary: 48 of 57235 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-13260

  8. Tymoteusz Motylewski uploaded patch set 4 07/17/17, 21:32

  9. TYPO3com voted on patch set 4 V -1 07/17/17, 21:42 Completed build in 09m 13s on Mon, 17 Jul, 11:42 PM Test Summary: 56877 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-13311

  10. Tymoteusz Motylewski uploaded patch set 5 07/17/17, 22:14

  11. TYPO3com voted on patch set 5 V +1 07/17/17, 22:24 Completed build in 10m 45s on Tue, 18 Jul, 12:24 AM Test Summary: 56877 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-13312

  12. Wouter Wolters voted on patch set 5 CR +1 07/19/17, 07:11

  13. Benjamin Kluge commented on patch set 5 CR -1 07/25/17, 21:34

    Typo3DbBackend.php:357

    This is duplicate code from LINE 375-385. It is possible to combine the if statement like if ($statement instanceof Qom\Statement && !$statement->getStatement() instanceof QueryBuilder) { and at Line 373 somthing like this: $queryBuilder = $statement->getStatement() instanceof QueryBuilder ? $statement->getStatement() : $this->objectManager->get(Typo3DbQueryParser::class)->convertQueryToDoctrineQueryBuilder($query);

    Typo3DbQueryParser.php:125

    maybe only returning the cloned element without overwriting the $this->queryBuilder or i dont understand it :)
  1. Tymoteusz Motylewski commented on patch set 5 07/25/17, 21:42

    Typo3DbBackend.php:357 Reply

    would you be able to push a new patchset improving it? I will not be able to tune that next days. Thanks!

    Typo3DbQueryParser.php:125 Reply

    the following code is also modifying $this->query builder by setting constraints. So in order to be compatible with old implementation we need to override $this->queryBuilder
  2. Tymoteusz Motylewski uploaded patch set 6 08/14/17, 14:26

  3. TYPO3com voted on patch set 6 V -1 08/14/17, 14:26 Completed build in 09s on Mon, 14 Aug, 04:26 PM Test Summary: No tests found Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-13694

  4. Tymoteusz Motylewski uploaded patch set 7 08/14/17, 14:27

  5. TYPO3com voted on patch set 7 V +1 08/14/17, 14:38 Completed build in 10m 41s on Mon, 14 Aug, 04:38 PM Test Summary: 57432 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-13695

  6. Jörg Bösche voted on patch set 7 CR +1 08/16/17, 08:10

  7. Tymoteusz Motylewski uploaded patch set 8 09/05/17, 10:35

  8. Benni Mack commented on patch set 8 09/07/17, 14:41

    you should probably rebase this one... to get bamboo up to speed again
  9. Tymoteusz Motylewski rebased onto patch set 9 09/07/17, 14:43

  10. Andreas Kienast uploaded patch set 10 09/07/17, 14:49

  11. TYPO3com voted on patch set 9 V -1 09/07/17, 15:05 Completed build in 22m 45s on Thu, 7 Sep, 05:05 PM Test Summary: 1 of 58494 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-14319

  12. TYPO3com voted on patch set 10 V +1 09/07/17, 15:12 Completed build in 23m 13s on Thu, 7 Sep, 05:12 PM Test Summary: 58131 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-14321

  13. Wouter Wolters voted on patch set 10 CR +1 09/07/17, 19:06

  14. Anja Leichsenring updated the commit message in patch set 11 09/07/17, 19:43

  15. Anja Leichsenring voted on patch set 11 CR +1 09/07/17, 19:46

  16. TYPO3com voted on patch set 11 V +1 09/07/17, 20:03 Completed build in 19m 13s on Thu, 7 Sep, 10:03 PM Test Summary: 58125 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-14369

  17. Andreas Kienast voted on patch set 11 CR +1 09/08/17, 19:39

  18. Joerg Kummer commented on patch set 11 V +1 09/08/17, 22:47

    Tested with a small extension, I could hand over for others to verify
  19. Stefan Neufeind voted on patch set 11 CR +1 09/09/17, 11:19

  20. Wouter Wolters voted on patch set 11 CR +1 09/09/17, 11:24

  21. Anja Leichsenring voted on patch set 11 V +1 09/09/17, 11:43

  22. Christian Kuhn voted on patch set 11 CR +2 V +2 09/09/17, 11:46

  23. Gerrit merged patch set 11 09/09/17, 11:46

  24. Christian Kuhn commented on patch set 12 09/09/17, 11:47

    Cherry Picked This patchset was cherry picked to branch TYPO3_8-7 as commit 0ac043d9cc1a9ba76dae564e488ca6f8ad149c76
  25. Oliver Hader commented on patch set 12 09/18/17, 07:09

    We could have an additional section in https://docs.typo3.org/typo3cms/ExtbaseFluidBook/6-Persistence/3-implement-individual-database-queries.html for these custom queries using Doctrine DBAL

    Typo3DbBackend.php:370

    Distinct handling only can be determined if the query has been parsed with convertQueryToDoctrineQueryBuilder - thus, this block could be part of the `else` part above