Review main Merged

83568[TASK] Provide common base for PHP-based integrity checker

Anja Leichsenring CR +2 V +2 Expert +759 −567 updated 05/16/24, 06:15

Commit message

With one traverser class and several checkers all necessary
checks can be executed within one CI job, which saves time and
resources.

By feeding all checkers with the same set of files, we can be safe not
to lose any files that should be checked.

Review

  • Code review CR +2 Done
    • Stefan Bürk +2
    • Anja Leichsenring +1
    • Andreas Kienast +1
  • Verified V +2 Done
    • Stefan Bürk +2
    • Andreas Kienast +1
    • core-ci +1 CI

Issues 1

Files 13

Review log 3144

Show 1419 earlier messages
  1. Anja Leichsenring uploaded patch set 1 03/22/24, 09:32

  2. Anja Leichsenring updated the commit message in patch set 2 03/22/24, 09:33

  3. core-ci voted on patch set 1 V -1 03/22/24, 09:39 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/54833

  4. core-ci voted on patch set 2 V -1 03/22/24, 09:39 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/54834

  5. Anja Leichsenring uploaded patch set 3 V -1 03/22/24, 09:43

  6. core-ci voted on patch set 3 V +1 03/22/24, 09:49 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/54836

  7. Oliver Klee updated the commit message in patch set 4 V +1 03/22/24, 10:17

  8. core-ci voted on patch set 4 V +1 03/22/24, 10:22 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/54837

  9. Simon Schaufelberger commented on patch set 4 03/22/24, 23:37

    NamespaceChecker.php:73

    use early return

    NamespaceChecker.php:213

    use early return
  10. Oliver Klee rebased onto patch set 5 V +1 05/15/24, 04:24

  11. core-ci voted on patch set 5 V +1 05/15/24, 04:30 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/57745

  12. Andreas Kienast commented on patch set 5 05/15/24, 06:34

    PhpIntegrityChecker.php:1

    Since this file is not executable, I think we can drop this line.

    PhpIntegrityChecker.php:62

    `in()` accepts only one argument. Using a named arguments doesn't make much sense here.

    PhpIntegrityChecker.php:71

    Same here.

    AbstractPhpIntegrityChecker.php:33

    Please set 3rd argument to `true`.

    NamespaceChecker.php:214

    I wonder whether we should use `JSON_THROW_ON_ERROR` and catch a potentially thrown `\JsonException` with a proper response. This would make the `is_array()` check obsolete.
  13. Andreas Kienast commented on patch set 5 05/15/24, 06:42

    In general, I think the emojis are a bit too much. The output itself is already colored and also prefixed by `[OK]` and `[ERROR]`.
  14. Anja Leichsenring commented on patch set 5 05/15/24, 07:23

    Reply

    emojis? Where do you see emojis??
  15. Stefan Bürk commented on patch set 5 CR -1 05/15/24, 07:24

    on it ...
  16. Andreas Kienast commented on patch set 5 05/15/24, 07:43

    Reply

    Just a few examples: ``` ❌ Following files were [...] ✅ Namespace integrity [...] ```
  17. Anja Leichsenring commented on patch set 5 05/15/24, 07:58

    Reply

    I see. They were there before, that was not my idea. I only unified the look. Guess it is a matter of taste. Your remark has been noted, thank you for the feedback.
  18. Stefan Bürk uploaded patch set 6 CR -1 V +1 05/15/24, 12:14

  19. Stefan Bürk commented on patch set 6 05/15/24, 12:14

    Reply

    Done

    PhpIntegrityChecker.php:1 Reply

    Added the executable flag again on the file (and renamed it). Thus keeping the shebang line.

    PhpIntegrityChecker.php:62 Reply

    Ack. Also not in line with core policy about named arguments. Removed them here and also used configuration property to see the paths at the top of the class.

    PhpIntegrityChecker.php:71 Reply

    Ack. Also not in line with core policy about named arguments. Removed them here and also used configuration property to see the paths at the top of the class.

    AbstractPhpIntegrityChecker.php:33 Reply

    Ack - done.

    NamespaceChecker.php:73 Reply

    Done

    NamespaceChecker.php:213 Reply

    Done

    NamespaceChecker.php:214 Reply

    Used `named arguments` now here (which is in line with core named arguments policy) and using JSON_THROW_ON_ERROR flag now along with a try-catch block. However, the `is_array()` check needs to be kept - empty file content would decode to a empty string again etc.
  1. core-ci voted on patch set 6 V -1 05/15/24, 12:19 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/57769

  2. Stefan Bürk uploaded patch set 7 05/15/24, 12:20

    Copied Votes: * Verified-1 (copy condition: "**changekind:NO_CHANGE**")
  3. core-ci voted on patch set 7 V -1 05/15/24, 12:25 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/57770

  4. Stefan Bürk uploaded patch set 8 V -1 05/15/24, 12:26

  5. Stefan Bürk uploaded patch set 9 05/15/24, 12:29

  6. Stefan Bürk uploaded patch set 10 05/15/24, 12:34

  7. core-ci voted on patch set 8 V +1 05/15/24, 12:34 Copied votes on follow-up patch sets have been updated: * Verified+1 has been copied to patch set 9 (copy condition: "changekind:NO_CHANGE"). Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/57771

  8. core-ci voted on patch set 9 V +1 05/15/24, 12:35 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/57772

  9. Stefan Bürk uploaded patch set 11 05/15/24, 12:35

  10. core-ci voted on patch set 10 V -1 05/15/24, 12:37 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/57773

  11. core-ci voted on patch set 11 V +1 05/15/24, 12:40 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/57774

  12. Stefan Bürk commented on patch set 11 CR +1 V +1 05/15/24, 12:44

    Thanks a lot @aleichsenring@ab-softlab.de for creating this change.
  13. Stefan Bürk voted on patch set 11 CR 0 V 0 05/15/24, 12:44

  14. Stefan Bürk commented on patch set 11 05/15/24, 12:45

    AbstractPhpIntegrityChecker.php:23

    I guess this should be not needed here ...
  15. Stefan Bürk uploaded patch set 12 V +1 05/15/24, 12:47

  16. Stefan Bürk commented on patch set 12 05/15/24, 12:49

    AbstractPhpIntegrityChecker.php:23 Reply

    Done
  17. core-ci voted on patch set 12 V +1 05/15/24, 12:52 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/57775

  18. Stefan Bürk voted on patch set 12 CR +1 V +1 05/15/24, 13:12

  19. Simon Schaufelberger uploaded patch set 13 CR +1 V +1 05/15/24, 21:19

  20. core-ci voted on patch set 13 V +1 05/15/24, 21:24 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/57791

  21. Anja Leichsenring voted on patch set 13 CR +1 05/16/24, 05:35

  22. Andreas Kienast voted on patch set 13 CR +1 05/16/24, 06:00

  23. Andreas Kienast voted on patch set 13 V +1 05/16/24, 06:06

  24. Stefan Bürk voted on patch set 13 CR +2 V +2 05/16/24, 06:15

  25. Stefan Bürk merged patch set 14 05/16/24, 06:15