Review main Merged

84506[TASK] Require array in setFlatConstants()

Christian Kuhn CR +2 V +2 Easy +4 −4 updated 06/05/24, 15:33

Commit message

Constant substitution in TS parser is implemented in
ConstantAwareTokenStream. It kicks in by casting the
stream to string after existing constants have been
set using ConstantAwareTokenStream->setFlatConstants().

To not have a "polluted" stream after setFlatConstants(),
the constants are reset using setFlatConstants(null)
after use. Ugly. Patch #102742 established a partial
solution already by cloning the stream instead.

Finish the clone approach to disallow setFlatConstants(null).
Add two missing void return annotations at related places
along the way.

Review

  • Code review CR +2 Done
    • Christian Kuhn +2
    • Garvin Hicking +1
    • Stefan Bürk +1
  • Verified V +2 Done
    • Christian Kuhn +2
    • Garvin Hicking +1
    • Stefan Bürk +1
    • core-ci +1 CI

Issues 3

Files 4

Review log 811

  1. Christian Kuhn uploaded patch set 1 06/05/24, 14:57

  2. core-ci voted on patch set 1 V +1 06/05/24, 15:02 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/58755

  3. Christian Kuhn updated the commit message in patch set 2 V +1 06/05/24, 15:06

  4. Christian Kuhn updated the commit message in patch set 3 06/05/24, 15:07

  5. Garvin Hicking voted on patch set 3 CR +1 V +1 06/05/24, 15:12

  6. core-ci voted on patch set 2 V +1 06/05/24, 15:14 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/58756

  7. core-ci voted on patch set 3 V +1 06/05/24, 15:14 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/58757

  8. Christian Kuhn commented on patch set 3 06/05/24, 15:18

    Note: i know it would be better to have some dedicated toString(array $withConstants) method and to not rely on magic __toString() to avoid the state change altogether, instead. This is more work, though.
  9. Stefan Bürk voted on patch set 3 CR +1 V +1 06/05/24, 15:27

  10. Christian Kuhn voted on patch set 3 CR +2 V +2 06/05/24, 15:33

  11. Christian Kuhn merged patch set 4 06/05/24, 15:33