Review main Merged Breaking

80184[!!!][TASK] Introduce type declarations in AbstractFile

Alexander Schnitzler CR +2 V +2 Normal +119 −87 updated 07/28/23, 17:52

Commit message

Review

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

Issues 1

Files 11

Review log 1622

  1. Alexander Schnitzler uploaded patch set 1 07/27/23, 10:50

  2. core-ci voted on patch set 1 V -1 07/27/23, 10:59 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/44608

  3. Alexander Schnitzler uploaded patch set 2 V -1 07/27/23, 11:11

  4. core-ci voted on patch set 2 V +1 07/27/23, 11:21 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/44612

  5. Alexander Schnitzler uploaded patch set 3 V +1 07/27/23, 12:41

  6. Alexander Schnitzler wrote 07/27/23, 12:41

    Topic set to FAL
  7. core-ci voted on patch set 3 V +1 07/27/23, 12:47 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/44615

  8. Oliver Klee commented on patch set 3 V +1 07/27/23, 13:27

    AbstractFile.php:232

    Nice!

    AbstractFile.php:259

    Would this be possible here? `@return self::FILETYPE_*`

    AbstractFile.php:477

    `@param DuplicationBehavior::* $conflictMode` (Ditto für `moveTo`, and also for the subclasses.)

    File.php:38

    `MetaDataAspect`

    ExtendedFileUtility.php:612

    Would it make sense to shorten this to `ResourceInterface|false`?
  9. Alexander Schnitzler commented on patch set 3 07/27/23, 13:58

    AbstractFile.php:259 Reply

    Yes, we can do this.

    AbstractFile.php:477 Reply

    We can do this of course but I left it out because we will introduce an enum here anyway and then we don't need additional information.

    File.php:38 Reply

    I'd like to introduce type declarations in this class in a seperate patch.

    ExtendedFileUtility.php:612 Reply

    Let's put it this way: phpstan doesn't complain. But that's just because the only method calling this then widens the return type to mixed. I am not sure how FAL understands a resource. It is the base interface for files and folders at the moment but I am not sure if resources can be copied or if this behaviour is tied to folders and files. func_copy distinguishes between copying files and folders and doesn't even check the interfaces but actual implementations (needs to change in the future) but it cannot simply copy a resource because it doesn't provide all necessary information for the process I guess. Following that logic, we currently can only widen the return type of this method that far. I don't even know if we could return a FolderInterface here but this area is not really part of the main change here, so I don't want to check further and end up changing param and return types all over the place.
  10. Alexander Schnitzler uploaded patch set 4 V +1 07/27/23, 14:07

  11. core-ci voted on patch set 4 V +1 07/27/23, 14:14 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/44619

  12. Alexander Schnitzler commented on patch set 4 07/27/23, 14:16

    AbstractFile.php:259 Reply

    Done
  13. Oliver Klee commented on patch set 4 07/27/23, 14:24

    AbstractFile.php:477 Reply

    Ack

    File.php:38 Reply

    Ack

    ExtendedFileUtility.php:612 Reply

    Ack
  14. Oliver Klee voted on patch set 4 V +1 CR +1 07/27/23, 14:25

  15. Alexander Schnitzler uploaded patch set 5 CR +1 V +1 07/28/23, 06:32

  16. core-ci voted on patch set 5 V -1 07/28/23, 06:45 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/44641

  17. Alexander Schnitzler uploaded patch set 6 V -1 07/28/23, 07:14

  18. core-ci voted on patch set 6 V +1 07/28/23, 07:21 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/44644

  19. Oliver Klee voted on patch set 6 V +1 CR +1 07/28/23, 07:56

  20. Christian Kuhn voted on patch set 6 V +1 CR +1 07/28/23, 17:51

  21. Stefan Bürk voted on patch set 6 V +2 CR +2 07/28/23, 17:52

  22. Stefan Bürk merged patch set 7 07/28/23, 17:52