Review main Merged

77321[BUGFIX] Normalize Windows file path in CompositeExpression

Robert Kärner CR +2 V +2 Easy +10 −5 updated 01/12/23, 18:40

Commit message

The path to the calling file in CompositeExpression::add and
::addMultiple is now normalized to forward slashes to work
with Windows paths.

Review

  • Code review CR +2 Done
    • Stefan Bürk +2
    • Oli Bartsch +1
  • Verified V +2 Done
    • Stefan Bürk +2
    • Oli Bartsch +1
    • core-ci +1 CI

Issues 1

Files 1

Review log 1518

  1. Robert Kärner uploaded patch set 1 01/10/23, 20:12

  2. Stefan Bürk commented on patch set 1 01/10/23, 20:15

    CompositeExpression.php:99

    I guess we should do the normalization here too, like in `add()`
  3. Robert Kärner commented on patch set 1 01/10/23, 20:17

    CompositeExpression.php:99 Reply

    Ack, good point. I didn't notice this line yet.
  4. Robert Kärner uploaded patch set 2 01/10/23, 20:19

  5. core-ci voted on patch set 1 V +1 01/10/23, 20:19 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/35657

  6. Robert Kärner commented on patch set 2 01/10/23, 20:21

    CompositeExpression.php:99 Reply

    Done
  7. Stefan Bürk commented on patch set 2 01/10/23, 20:23

    CompositeExpression.php:70

    Instead of the replace here, I would suggest to use `GeneralUtility::fixWindowsFilePath()` here - what do you think ?

    CompositeExpression.php:100

    the path backslash/slash replacement (windows path sanatizing) should be done here too. ( `GeneralUtility::fixWindowsFilePath()` ). Same as above.
  8. Stefan Bürk commented on patch set 2 01/10/23, 20:26

    CompositeExpression.php:70 Reply

    Not sure if we should do that for the check against __FILE__ to (do not have a windows system since over 2 decades). Eventually for $callingFile generally and for __FILE__ in the check .. but not sure here.
  9. core-ci voted on patch set 2 V +1 01/10/23, 20:26 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/35658

  10. Robert Kärner commented on patch set 2 01/10/23, 20:28

    CompositeExpression.php:70 Reply

    Argh, I knew there was a function for that somewhere. I tried looking in PathUtility and searched for str_replace('\ but no luck. I agree, that's much better.

    CompositeExpression.php:100 Reply

    Rookie mistake. It's probably too late. Will push a new patchset tomorrow morning when my brain is in working condition again.
  11. Stefan Bürk uploaded patch set 3 V +1 01/11/23, 14:16

  12. Stefan Bürk commented on patch set 3 01/11/23, 14:17

    CompositeExpression.php:70 Reply

    Done

    CompositeExpression.php:100 Reply

    Done
  13. core-ci voted on patch set 3 V +1 01/11/23, 14:24 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/35688

  14. Stefan Bürk voted on patch set 3 V +1 CR +1 01/12/23, 12:14

  15. Robert Kärner commented on patch set 3 01/12/23, 13:32

    I cannot vote, but I have verified that it's working on my instance. Code also looks good to me.
  16. Oli Bartsch voted on patch set 3 V +1 CR +1 01/12/23, 13:49

  17. Stefan Bürk voted on patch set 3 V +2 CR +2 01/12/23, 18:40

  18. Stefan Bürk merged patch set 4 01/12/23, 18:40