Review main Merged

53263[FEATURE] Cleanup buildQueryParameters hook

Frank Nägler CR +2 V +2 Normal +173 −75 updated 06/29/17, 11:59

Commit message

Add the QueryBuilder object to list module buildQueryParameters
hook allowing direct operation on this object including proper
named parameter usage and quoting.
The old array/string based parameter handling still works but
is deprecated.

Review

  • Code review CR +2
    • Christian Kuhn +2
    • Frank Nägler +1
    • Henrik Elsner +1
  • Verified V +2
    • Christian Kuhn +2
    • Henrik Elsner +1
    • TYPO3com +1 CI

Issues 1

Files 3

Review log 2736

Show 711 earlier messages
  1. Frank Nägler uploaded patch set 1 06/19/17, 20:32

  2. TYPO3com voted on patch set 1 V +1 06/19/17, 20:41 Completed build in 09m 06s on Mon, 19 Jun, 10:41 PM Test Summary: 56498 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-12693

  3. Frank Nägler uploaded patch set 2 06/19/17, 21:01

  4. Frank Nägler uploaded patch set 3 06/19/17, 21:03

  5. TYPO3com voted on patch set 2 V +1 06/19/17, 21:12 Completed build in 11m 06s on Mon, 19 Jun, 11:12 PM Test Summary: 56498 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-12694

  6. TYPO3com voted on patch set 3 V +1 06/19/17, 21:14 Completed build in 10m 53s on Mon, 19 Jun, 11:14 PM Test Summary: 56498 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-12695

  7. Henrik Elsner commented on patch set 3 V -1 06/21/17, 08:43

    the list modul is not working because of an array which is not changed into a string. AFAIS this results from the constraints in line ~830.
  8. Frank Nägler uploaded patch set 4 06/21/17, 08:54

  9. TYPO3com voted on patch set 4 V +1 06/21/17, 09:04 Completed build in 09m 44s on Wed, 21 Jun, 11:04 AM Test Summary: 56528 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-12748

  10. Henrik Elsner voted on patch set 4 CR +1 06/21/17, 09:18

  11. Henrik Elsner updated the commit message in patch set 5 06/21/17, 09:40

  1. Henrik Elsner commented on patch set 5 V +1 06/21/17, 09:41

    rst-file missing
  2. Henrik Elsner voted on patch set 5 V -1 06/21/17, 09:41

  3. TYPO3com voted on patch set 5 V +1 06/21/17, 09:51 Completed build in 10m 50s on Wed, 21 Jun, 11:51 AM Test Summary: 56528 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-12749

  4. Frank Nägler uploaded patch set 6 06/21/17, 19:23

  5. Henrik Elsner voted on patch set 6 CR +1 06/21/17, 19:28

  6. TYPO3com voted on patch set 6 V -1 06/21/17, 20:16 Completed build in 11m 56s on Wed, 21 Jun, 10:16 PM Test Summary: 56528 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-12762

  7. Morton Jonuschat commented on patch set 6 CR -1 06/21/17, 22:07

    A bit more information in the commit message and the issue would be great. I'm also not certain this classifies as a task, it seems more like a Feature to me (and the RST seems to indicate the same).

    AbstractDatabaseRecordList.php:32

    This should not be in here

    AbstractDatabaseRecordList.php:504

    Why is the return value of getPageIdConstraint not used? Leftover from refactor?

    AbstractDatabaseRecordList.php:670

    No empty line before @return

    AbstractDatabaseRecordList.php:689

    What's the reason for this?

    AbstractDatabaseRecordList.php:695

    Is buildQueryParameters the right method name after the refactor? It seems to return a QueryBuilder now.

    AbstractDatabaseRecordList.php:701

    Description seems not to match what the method does.

    AbstractDatabaseRecordList.php:705

    No empty line before @return

    AbstractDatabaseRecordList.php:716

    This is not the way to do it, only MySQL uses backticks. Postgres uses double quotes, MSSQL uses square brackets. It also doesn't take into account that there might be stuff in the table name that needs to be unquoted as well.

    AbstractDatabaseRecordList.php:719

    This is a change, the fieldnames are now quoted as well.

    AbstractDatabaseRecordList.php:741

    This method name/mode of operation takes a lot of inside knowledge, we should really change that.

    AbstractDatabaseRecordList.php:773

    This might be very different from the previous input and might affect/break hooks that expected the piece-by-piece additional constraints. This alone probably warrants a [!!!] declaration and a Breaking-RST

    AbstractDatabaseRecordList.php:821

    No empty line before @return

    AbstractDatabaseRecordList.php:835

    What's the reason for this?

    AbstractDatabaseRecordList.php:841

    misleading method name

    AbstractDatabaseRecordList.php:1351

    Description doesn't match what's happening in the method

    AbstractDatabaseRecordList.php:1356

    method doesn't return anything, getPageIdConstraint name is very misleading, especially as it modifies the QueryBuilder that gets passed in.
  8. Frank Nägler commented on patch set 6 CR -1 06/21/17, 22:37

    thx for your feedback Morton, I will push an update tomorrow

    AbstractDatabaseRecordList.php:689 Reply

    the idea was that you can use addWhere in the hook every time.

    AbstractDatabaseRecordList.php:716 Reply

    good point, will change it

    AbstractDatabaseRecordList.php:719 Reply

    thx, will change it
  9. Frank Nägler commented on patch set 6 06/22/17, 09:29

    will push an update shortly

    AbstractDatabaseRecordList.php:32 Reply

    Done

    AbstractDatabaseRecordList.php:504 Reply

    no return anymore, I will rename this method to addPageIdConstraint

    AbstractDatabaseRecordList.php:689 Reply

    I have checked it again and I think we need it to be compatible with the old hook

    AbstractDatabaseRecordList.php:695 Reply

    It is the name of the hook, not sure if we should rename it. I will discuss it with Lolli today.

    AbstractDatabaseRecordList.php:701 Reply

    Done

    AbstractDatabaseRecordList.php:716 Reply

    Done

    AbstractDatabaseRecordList.php:719 Reply

    Done

    AbstractDatabaseRecordList.php:741 Reply

    name changed to addPageIdConstraint

    AbstractDatabaseRecordList.php:1351 Reply

    Done

    AbstractDatabaseRecordList.php:1356 Reply

    Done
  10. Frank Nägler uploaded patch set 7 06/22/17, 10:35

  11. TYPO3com voted on patch set 7 V +1 06/22/17, 10:46 Completed build in 10m 42s on Thu, 22 Jun, 12:46 PM Test Summary: 56528 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-12778

  12. Christian Kuhn commented on patch set 7 CR -1 06/29/17, 09:25

    on it.
  13. Christian Kuhn uploaded patch set 8 06/29/17, 10:23

  14. Christian Kuhn commented on patch set 8 06/29/17, 10:24

    AbstractDatabaseRecordList.php:716

    uhm ... no ;)

    AbstractDatabaseRecordList.php:774

    this returns fileds quoted already, use $fieldList again.

    AbstractDatabaseRecordList.php:789

    nice solution

    AbstractDatabaseRecordList.php:1366

    createNamedParameter can be used now.
  15. Frank Nägler voted on patch set 8 CR +1 06/29/17, 10:27

  16. TYPO3com voted on patch set 8 V +1 06/29/17, 10:33 Completed build in 10m 27s on Thu, 29 Jun, 12:33 PM Test Summary: 56733 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-12881

  17. Henrik Elsner voted on patch set 8 CR +1 06/29/17, 10:34

  18. Henrik Elsner voted on patch set 8 V +1 06/29/17, 10:43

  19. Georg Ringer commented on patch set 8 06/29/17, 10:49

    this should be then a FEATURE?
  20. Christian Kuhn updated the commit message in patch set 9 06/29/17, 11:38

  21. TYPO3com voted on patch set 9 V +1 06/29/17, 11:48 Completed build in 10m 30s on Thu, 29 Jun, 01:48 PM Test Summary: 56733 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-12886

  22. Frank Nägler voted on patch set 9 CR +1 06/29/17, 11:50

  23. Henrik Elsner voted on patch set 9 CR +1 V +1 06/29/17, 11:55

  24. Christian Kuhn voted on patch set 9 CR +2 V +2 06/29/17, 11:59

  25. Gerrit merged patch set 9 06/29/17, 11:59