Review main Merged Breaking

77802[!!!][TASK] Ensure continuous array keys for GU::intExplode() return

Oliver Klee CR +2 V +2 Normal +63 −3 updated 01/23/24, 10:31

Commit message

To follow the principle of the "smallest surprise" concerning the
behavior of our code, the integer array keys of the return values of
`GU::intExplode()` should be ensured to be gap-free.

Review

  • Code review CR +2 Done
    • Christian Kuhn +2
    • Garvin Hicking +1
    • Guido Schmechel +1
    • Andreas Kienast +1
    • Simon Schaufelberger +1
  • Verified V +2 Done
    • Christian Kuhn +2
    • Garvin Hicking +1
    • Simon Schaufelberger +1
    • core-ci +1 CI

Issues 1

Files 3

Review log 5062

Show 2937 earlier messages
  1. Oliver Klee uploaded patch set 1 02/09/23, 13:13

  2. core-ci voted on patch set 1 V -1 02/09/23, 13:29 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/37454

  3. Oliver Klee uploaded patch set 2 V -1 02/09/23, 13:38

  4. core-ci voted on patch set 2 V +1 02/09/23, 13:47 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/37460

  5. Nikita Hovratov voted on patch set 2 V +1 CR +1 02/09/23, 16:43

  6. Nikita Hovratov commented on patch set 2 02/09/23, 16:56

    Note to reviewers: This parameter was added back in the days, because this method used to use trimExplode internally: 648cd2bed8330e5a1f674d3c8665a7518d92d738 Later it was removed again, but the parameter stayed: https://review.typo3.org/c/Packages/TYPO3.CMS/+/26740 It makes absolutely no sense for this method to limit the result and then combine the rest to a string. It's only there because of historical reasons.
  7. Nikita Hovratov commented on patch set 2 02/09/23, 16:58

    Reply

    Sorry, this comment was meant for this patch: https://review.typo3.org/c/Packages/TYPO3.CMS/+/77806
  8. Stefan Bürk commented on patch set 2 CR -1 02/09/23, 20:31

    De-facto this is a change in behaviour of a public api method. Some may struggle with not renumbering the keys, some are now that fact and expecting not renumbering it. Thus, I would take this IMO as breaking.
  9. Stefan Bürk commented on patch set 2 02/09/23, 20:32

    Reply

    some are aware of that fact*
  10. Oliver Klee commented on patch set 2 02/09/23, 21:48

    Reply

    So this needs to have a breaking RST and wait until 13.0?
  11. Georg Ringer commented on patch set 2 02/10/23, 07:58

    IMO I would abandon this change. this is a micro optimization which just changes code around with no real benefit (IMHO!). in the long run we should try to create better code without need of such helper classes
  12. Oliver Klee commented on patch set 2 02/10/23, 09:09

    Reply

    Now that I've though about it, I don't consider this breaking anymore. It's not part of the documented API that there might be gaps in the array keys, and I cannot think of any way a caller might depend on that (while I can think of scenarios where the caller might depend on the int array keys not having gaps). Georg, this is not an optimization (in the sense of: a performance optimization), but an improvement of the developer experience: The code should behave as little surprising as possible, and the array keys having gaps is such a surprise. I consider this a benefit.
  13. Oliver Klee commented on patch set 2 02/11/23, 18:51

    Reply

    This is not really breaking (as it does not make sense to rely on the gaps in the array).
  14. Georg Ringer commented on patch set 2 02/12/23, 11:12

    yes it is not documented but on the other case it is a really often uses method, therefore we don't know what other devs expect or not. just to be improve the user experience I still would tend to have that as rst and in a v13
  15. Oliver Klee commented on patch set 2 CR -1 02/12/23, 13:34

    Thanks for the additional feedback! Then I'll put this on the backburner until we are in the 13.0 development cycle.
  16. Oliver Klee updated the commit message in patch set 3 CR +1 V +1 02/13/23, 12:51

  17. core-ci voted on patch set 3 V +1 02/13/23, 12:59 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/37647

  18. Oliver Klee marked it work in progress 02/13/23, 16:23

  19. Oliver Klee uploaded patch set 4 V +1 03/11/23, 18:02

  20. Stefan Bürk commented on patch set 4 03/11/23, 18:43

    Reply

    This is a generic method. And due the fact it left the gaps, I have used in quite some projects for some task where I realy on these gaps. So even if you have no use-case or don't see one, there are such cases. So changing behaviour is breaking at all means. I have to implement then my own "intExplode" method which works like the core one before. This is doable, but de-facto I'm not expecting breaking stuff outside dot-zero releases - especial for public methods working quite over many major versions the same way. I know it's wip, just wanted to emphazise this again.
  21. Oliver Klee commented on patch set 4 03/11/23, 19:01

    Reply

    FYI: I rebased this to keep the bitrot at bay. I'm not currently working on this. Thanks for the reminder anyway. I'd like to understand the problem this change creates. In which way do you rely on the gaps?
  22. core-ci voted on patch set 4 V +1 03/11/23, 19:03 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/38806

  23. Oliver Klee wrote 04/05/23, 12:02

    Topic set to phpstan
  24. Oliver Klee uploaded patch set 5 V +1 11/25/23, 13:42

  25. core-ci voted on patch set 5 V +1 11/25/23, 13:48 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/49925

  26. Oliver Klee uploaded patch set 6 V +1 01/03/24, 09:24

  27. Oliver Klee marked it ready for review 01/03/24, 09:25

  28. core-ci voted on patch set 6 V +1 01/03/24, 09:30 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/51066

  29. Oliver Klee uploaded patch set 7 V +1 01/03/24, 13:30

  30. core-ci voted on patch set 7 V +1 01/03/24, 13:36 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/51077

  31. Oliver Klee wrote 01/03/24, 14:49

    Topic phpstan removed
  32. Stefan Bürk voted on patch set 7 CR +1 V +1 01/06/24, 15:18

  33. Garvin Hicking commented on patch set 7 01/08/24, 22:10

    IMO this should get a Important-ReST-notice indiciating a BC on this. Personally I do think it could account for some weird breakage in projects using the helper method where fixed indices could be used. So let us have a clear conscience by documenting it? :-)
  34. Oliver Klee uploaded patch set 8 CR +1 V +1 01/19/24, 09:54

  35. Oliver Klee commented on patch set 7 01/19/24, 09:54

    Reply

    Done
  36. core-ci voted on patch set 8 V +1 01/19/24, 10:01 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/51795

  37. Garvin Hicking commented on patch set 8 01/19/24, 10:14

    Breaking-99898-ContinuousArrayKeysForIntExplode.rst:20

    missing "the" Also, for clarity maybe we could add an example of an array how it was delivered before, and how it is now? That would be much easier to grok then without needing to read the text (which is also good and required)?
  1. Oliver Klee uploaded patch set 9 V +1 01/19/24, 18:21

  2. Oliver Klee commented on patch set 8 01/19/24, 18:22

    Breaking-99898-ContinuousArrayKeysForIntExplode.rst:20 Reply

    Done
  3. Garvin Hicking voted on patch set 9 CR +1 V +1 01/19/24, 18:25

  4. core-ci voted on patch set 9 V +1 01/19/24, 18:27 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/51828

  5. Guido Schmechel voted on patch set 9 CR +1 01/20/24, 08:58

  6. Stefan Bürk updated the commit message in patch set 10 CR +1 V +1 01/21/24, 02:34

  7. Stefan Bürk rebased onto patch set 11 01/21/24, 02:34

  8. Stefan Bürk commented on patch set 11 01/21/24, 02:35

    Change has a breaking rst, but commit message missed to have `[!!!]`. Added.
  9. Stefan Bürk voted on patch set 11 CR +1 V +1 01/21/24, 02:35

  10. core-ci voted on patch set 10 V +1 01/21/24, 02:40 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/51880

  11. core-ci voted on patch set 11 V +1 01/21/24, 02:41 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/51881

  12. Oliver Klee commented on patch set 11 01/21/24, 09:26

    Reply

    Thanks!
  13. Guido Schmechel voted on patch set 11 CR +1 01/21/24, 09:48

  14. Garvin Hicking voted on patch set 11 CR +1 V +1 01/21/24, 12:40

  15. Guido Schmechel commented on patch set 11 CR -1 01/21/24, 20:52

    GeneralUtility.php:762

  16. Guido Schmechel voted on patch set 11 CR +1 01/21/24, 20:53

  17. Oliver Klee rebased onto patch set 12 CR +1 V +1 01/22/24, 11:09

  18. Oliver Klee commented on patch set 12 01/22/24, 11:09

    GeneralUtility.php:762 Reply

    Done
  19. core-ci voted on patch set 12 V +1 01/22/24, 11:14 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/51922

  20. Garvin Hicking voted on patch set 12 CR +1 V +1 01/22/24, 12:31

  21. Andreas Kienast voted on patch set 12 CR +1 01/22/24, 15:31

  22. Simon Schaufelberger voted on patch set 12 CR +1 V +1 01/22/24, 17:17

  23. Guido Schmechel voted on patch set 12 CR +1 01/22/24, 19:52

  24. Christian Kuhn voted on patch set 12 CR +2 V +2 01/23/24, 10:31

  25. Christian Kuhn merged patch set 13 01/23/24, 10:31