Review main Merged

62418[TASK] Follow-up: Introduce native pagination for lists

Alexander Schnitzler CR +2 V +2 Easy +25 −23 updated 11/23/19, 14:52

Commit message

- Switch the order of constructor arguments $currentPageNumber
  and $itemsPerPage of both the ArrayPaginator and QueryResultPaginator
  classes as the $currentPageNumber needs to be set on every object
  construction whereas the $itemsPerPage argument only needs to be
  changed for paginators that use a differen amount of items per page
  other than the default of 10.
- Change visibility of properties of both the ArrayPaginator and the
  QueryResultPaginator from protected to private as both classes are
  marked final.

Review

  • Code review CR +2 Done
    • Susi Moog +2
    • Daniel Goerz +1
  • Verified V +2 Done
    • Susi Moog +2
    • Daniel Goerz +1
    • TYPO3com +1 CI

Issues 1

Files 5

Review log 1012

  1. Alexander Schnitzler uploaded patch set 1 11/23/19, 13:36

  2. Mathias Brodala commented on patch set 1 11/23/19, 13:45

    Unresolved

    We don't do FOLLOWUP anymore AFAIR. So please make this a task.
  3. Sebastian Fischer voted on patch set 1 CR +1 11/23/19, 13:45

  4. TYPO3com voted on patch set 1 V +1 11/23/19, 13:46 Completed build in 09m 42s on Sat, 23 Nov, 01:46 PM Test Summary: 48181 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-38746

  5. Alexander Schnitzler uploaded patch set 2 11/23/19, 13:47

  6. TYPO3com voted on patch set 2 V +1 11/23/19, 13:55 Completed build in 07m 58s on Sat, 23 Nov, 01:55 PM Test Summary: 48181 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-38747

  7. Mathias Brodala commented on patch set 2 11/23/19, 14:19

    This does not make sense IMO. Private only makes sense for classes which can be extended to hide internal implementation details. A final class cannot be extended so there is no need for "private".
  8. Alexander Schnitzler commented on patch set 2 11/23/19, 14:33

    Reply

    Right, it's not needed but it doesn't hurt neither. One might have a look at the class, miss the final and think: Ah, great, I can access those properties in a sub class. To me, private is a logical consequence as it visualizes (again) that this is internal logic, not to be messed with.
  9. Mathias Brodala commented on patch set 2 11/23/19, 14:46

    Reply

    IMO making something private is a decision which must be done intentional to hide internal implementation details in case extending classes could mess with them. Again, that's impossible here. If we ever decide to mark these classes as "non-final", thus intentionally allow extension, we should look at the code at that time to decide if something must be "private". And if you miss the "final" you'll notice as soon as you try to extend the class. ;-)
  10. Daniel Goerz voted on patch set 2 V +1 CR +1 11/23/19, 14:48

  11. Susi Moog commented on patch set 2 V +2 CR +2 11/23/19, 14:51

    Reply Unresolved

    Especially in case we remove the final at some point, I want to have the private by default, as visibility should then be an active decision we take.
  12. Susi Moog merged patch set 3 11/23/19, 14:52