Review main Merged

73490[BUGFIX] Use GeneralUtility to create file and folder structure

Georg Ringer CR +2 V +2 Normal +51 −5 updated 11/09/26, 20:21

Commit message

By using GeneralUtility::mkdir() and GeneralUtility::writeFile() the
createGroup options are taken into account when creating
the file + folder structure.

Review

  • Code review CR +2 Done
    • Georg Ringer +2
    • Oliver Klee +1
    • Markus Klein +1
    • Simon Schaufelberger +1
    • Benni Mack +1
  • Verified V +2 Done
    • Georg Ringer +2
    • Oliver Klee +1
    • Markus Klein +1
    • Simon Schaufelberger +1
    • Benni Mack +1
    • core-ci +1 CI

Issues 1

Files 5

Review log 4658

Show 2533 earlier messages
  1. Georg Ringer uploaded patch set 1 02/14/22, 19:54

  2. Georg Ringer commented on patch set 1 02/14/22, 19:54

    This change is ready for review.
  3. core-ci voted on patch set 1 V -1 02/14/22, 20:05 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/23557

  4. Christian Kuhn commented on patch set 1 CR -1 02/14/22, 20:27

    i fear that won't be that simple. afaik, the folderStructure has an own way to define and apply access rights. note it is also used during installation process where the system is not fully set up, yet.
  5. Benni Mack updated the commit message in patch set 2 CR -1 V -1 05/03/23, 09:15

  6. core-ci voted on patch set 2 V -1 05/03/23, 09:18 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/41386

  7. Simon Schaufelberger uploaded patch set 3 V -1 08/13/23, 15:05

  8. Simon Schaufelberger uploaded patch set 4 08/13/23, 15:07

  9. core-ci voted on patch set 4 V +1 08/13/23, 15:15 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/45449

  10. core-ci voted on patch set 3 V -1 08/13/23, 15:16 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/45448

  11. Simon Schaufelberger voted on patch set 4 V +1 CR +1 08/13/23, 15:58

  12. Jörg Bösche voted on patch set 4 CR +1 08/14/23, 19:08

  13. Oliver Klee voted on patch set 4 CR +1 08/14/23, 19:21

  14. Oliver Klee commented on patch set 4 08/14/23, 20:23

    Would this also make sense for 11.5?
  15. Simon Schaufelberger commented on patch set 4 08/15/23, 03:48

    Reply

    sure, why not?
  16. Simon Schaufelberger updated the commit message in patch set 5 CR +1 V +1 08/15/23, 03:48

  17. Simon Schaufelberger voted on patch set 5 V +1 CR +1 08/15/23, 03:48

  18. Simon Schaufelberger commented on patch set 5 08/15/23, 03:48

    Reply

    Done
  19. core-ci voted on patch set 5 V +1 08/15/23, 03:55 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/45490

  20. Oliver Klee voted on patch set 5 CR +1 08/15/23, 08:10

  21. Jörg Bösche voted on patch set 5 CR +1 08/22/23, 12:03

  22. Guido Schmechel commented on patch set 5 08/25/23, 18:50

    There are 1-2 more hits for mkdir and touch. Do the jobs also need to be adjusted? I'll leave the tests out of it. Example: GeneralUtility::createDirectoryPath At least the permissions seem to be respected.
  23. Simon Schaufelberger uploaded patch set 6 CR +1 V +1 09/01/23, 17:02

  24. Simon Schaufelberger uploaded patch set 7 09/01/23, 17:05

  25. Christian Kuhn commented on patch set 7 09/01/23, 17:06

    Reply

    imho not resolved.
  26. Oliver Klee voted on patch set 7 CR +1 09/01/23, 17:07

  27. Simon Schaufelberger commented on patch set 7 09/01/23, 17:08

    please have a look if I have overdone it or if everything is ok

    LocalDriver.php:956

    there is one more here but this can't be changed because it sets the mtime which isn't possible with GeneralUtility::writeFile
  28. core-ci voted on patch set 7 V +1 09/01/23, 17:12 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/46159

  29. core-ci voted on patch set 6 V -1 09/01/23, 17:14 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/46158

  30. Markus Klein commented on patch set 7 09/02/23, 11:28

    Did you check the history of each place, if this has been some other implementation before and was changed to "native" functions for some reason maybe?

    LocalDriver.php:956 Reply

    That shouldn't be a problem, because this is a temporary path that should be removed by PHP again.
  31. Simon Schaufelberger uploaded patch set 8 CR +1 V +1 09/04/23, 02:43

  32. Simon Schaufelberger commented on patch set 8 09/04/23, 02:47

    SemaphoreLockStrategy.php:84

    I'm not sure if we need to use the API here.

    StorageRepository.php:290

    I think this can be ignored as the file will be removed again a few lines down. Other opinions?

    DirectoryNode.php:260

    I think this can be ignored as the file will be removed again a few lines down. Other opinions?

    CoreUpdateService.php:165

    I think this can be ignored as the file will be removed again a few lines down. Other opinions?

    CoreUpdateService.php:196

    I think this can be ignored as the file will be removed again a few lines down. Other opinions?

    EnableFileService.php:150

    I'm not sure about this one.
  33. core-ci voted on patch set 8 V +1 09/04/23, 02:50 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/46180

  1. Benni Mack updated the commit message in patch set 9 V +1 10/18/24, 14:11

  2. Benni Mack rebased onto patch set 10 12/10/24, 14:14

  3. core-ci voted on patch set 10 V +1 12/10/24, 14:19 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/70862

  4. Markus Klein commented on patch set 10 CR -1 12/12/24, 12:02

    SemaphoreLockStrategy.php:84 Reply

    should be okay here, the path is always an "allowed" one, so this should work.

    StorageRepository.php:290 Reply

    Agreed.

    DirectoryNode.php:260 Reply

    agreed

    CoreUpdateService.php:165 Reply

    agreed

    CoreUpdateService.php:196 Reply

    agreed

    EnableFileService.php:150 Reply

    file already exists, so permissions are not modified by touch()
  5. Benni Mack uploaded patch set 11 CR -1 V +1 03/06/25, 22:02

  6. core-ci voted on patch set 11 V +1 03/06/25, 22:08 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/75253

  7. Georg Ringer commented on patch set 11 03/06/25, 22:58

    SemaphoreLockStrategy.php:84 Reply

    Done

    StorageRepository.php:290 Reply

    but also doesnt harm

    DirectoryNode.php:260 Reply

    also doesn't harm to do so

    CoreUpdateService.php:165 Reply

    Done

    CoreUpdateService.php:196 Reply

    also doesn't harm to do so
  8. Benni Mack commented on patch set 11 03/23/25, 22:16

    LocalDriver.php:914

    I think touch() is better here tbh
  9. Benni Mack uploaded patch set 12 V +1 03/27/25, 19:55

  10. Benni Mack commented on patch set 12 CR +1 V +1 03/27/25, 19:56

    This change now does only the changes relevant in the ticket.
  11. Benni Mack commented on patch set 12 03/27/25, 19:57

    Reply

    GeneralUtility::mkdir() AND writeFile() call fixPermissions, which will fall back to sane defaults if no config is available. I think it's the best tradeoff for new setups (best practices) and ... when this is called after e.g. deployments. Please confirm.

    Reply

    yes

    Reply

    Done

    LocalDriver.php:914 Reply

    Done

    StorageRepository.php:290 Reply

    Done

    DirectoryNode.php:260 Reply

    Done

    CoreUpdateService.php:196 Reply

    Done

    EnableFileService.php:150 Reply

    Done
  12. Benni Mack wrote 03/27/25, 19:58

    Hashtag added: lolli-feedback
  13. core-ci voted on patch set 12 V +1 03/27/25, 20:04 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/76501

  14. Benni Mack commented on patch set 12 CR -1 03/28/25, 10:11

    one thing I don't get. FileNode has the property $targetPermission -> but doesn't apply them. Why?
  15. Benni Mack marked it work in progress 03/28/25, 10:11

  16. Georg Ringer uploaded patch set 13 CR -1 V +1 09/17/26, 20:05

  17. Georg Ringer commented on patch set 13 09/17/26, 20:05

    This change is ready for review.
  18. core-ci voted on patch set 13 V +1 09/17/26, 20:13 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/108766

  19. Simon Schaufelberger voted on patch set 13 CR +1 V +1 09/17/26, 21:47

  20. Georg Ringer commented on patch set 13 11/03/26, 19:21

    Reply

    Done
  21. Markus Klein voted on patch set 13 CR +1 V +1 11/04/26, 11:46

  22. Oliver Klee voted on patch set 13 CR +1 V +1 11/04/26, 11:50

  23. Benni Mack voted on patch set 13 CR +1 V +1 11/09/26, 09:36

  24. Georg Ringer voted on patch set 13 CR +2 V +2 11/09/26, 20:04

  25. Georg Ringer merged patch set 14 11/09/26, 20:21