Review main Merged

46388[BUGFIX] Ensure correct absolute paths for fluid template paths

Nicole Hummel CR +2 V +2 Easy +25 −3 updated 02/01/16, 13:34

Commit message

This patch uses TYPO3 internal functions to resolves absolute paths
which can handle absolute Windows paths as well.

Review

  • Code review CR +2
    • Helmut Hummel +2
    • Daniel Maier +1
    • Mathias Brodala +1
  • Verified V +2
    • Helmut Hummel +2
    • Riccardo De Contardi +1
    • Daniel Maier +1
    • Mathias Brodala +1

Issues 1

Files 1

Review log 14

  1. Nicole Hummel uploaded patch set 1 01/30/16, 11:09

  2. Nicole Hummel uploaded patch set 2 01/30/16, 11:28

  3. Claus Due commented on patch set 1 01/30/16, 12:22

    Thanks Nicole - didn't think about the Windows people while making the TemplatePaths implementation. Just that one comment, everything else looks fine to me.

    TemplatePaths.php:145

    Everything basically looks good here, but I'm not sure if this reassignment-by-reference-in-loop is permitted?
  4. Helmut Hummel commented on patch set 1 01/30/16, 12:35

    TemplatePaths.php:145 Reply

    This part is a copy of your code: https://github.com/TYPO3Fluid/Fluid/blob/master/src/View/TemplatePaths.php#L407 Maybe also re-think the functionality regarding Windows Paths in standalone Fluid? And maybe fix the method description: https://github.com/TYPO3Fluid/Fluid/blob/master/src/View/TemplatePaths.php#L397-L398
  5. Helmut Hummel commented on patch set 1 01/30/16, 12:39

    I'd merge this as a quick fix to get master working again on Windows, but fix Windows path handling in upstream fluid at the same time, so that we maybe can remove some code in our adapter again.

    TemplatePaths.php:142

    I would also change this in is_string($reference)

    TemplatePaths.php:144

    ... and add a elseif (is_array(reference)) here and throw an exception in the else part. besides that, I would probably better introduce a method ensureAbsolutePaths which only accepts an array and let the method ensureAbsolutePath only handle strings. Then we need to only override the essential implementation in our code.
  6. Claus Due commented on patch set 1 01/30/16, 12:39

    TemplatePaths.php:145 Reply

    I'm personally okay with the reference assignment, I only meant "is it allowed in TYPO3 CMS?". Yep, method description and windows paths opened as issue in Fluid. https://github.com/TYPO3Fluid/Fluid/issues/70
  7. Claus Due commented on patch set 1 01/30/16, 12:43

    Suggested refactoring ensureAbsolutePath / Paths: https://github.com/TYPO3Fluid/Fluid/issues/71
  8. Claus Due commented on patch set 2 01/30/16, 13:59

    https://github.com/TYPO3Fluid/Fluid/pull/72 is proposed which gives you ensureAbsolutePath to override. This patch for the adapter can be safely merged and then simplified a little when Fluid dependency is raised to 1.0.4.
  9. Daniel Maier commented on patch set 2 V +1 01/30/16, 20:58

    Verified on Windows
  10. Mathias Brodala commented on patch set 2 CR +1 V +1 01/31/16, 10:22

    Seen it working with my own eyes on a Windows TYPO3. :-)
  11. Daniel Maier voted on patch set 2 CR +1 01/31/16, 10:25

  12. Riccardo De Contardi commented on patch set 2 V +1 02/01/16, 13:30

    the modules are visible again, no errors AFAICS
  13. Helmut Hummel voted on patch set 2 CR +2 V +2 02/01/16, 13:34

  14. Gerrit merged patch set 2 02/01/16, 13:34