83568[TASK] Provide common base for PHP-based integrity checker
Commit message
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
- Build/gitlab-ci/nightly/integrity.yml+2 −5
- Build/gitlab-ci/pre-merge/integrity.yml+2 −5
- Build/Scripts/phpIntegrityChecks/AbstractPhpIntegrityChecker.php4new+91 −0
- Build/Scripts/phpIntegrityChecks/AnnotationChecker.phprenamed+43 −72
- Build/Scripts/phpIntegrityChecks/NamespaceChecker.php6new+255 −0
- Build/Scripts/phpIntegrityChecks/TestClassFinalChecker.phpnew+72 −0
- Build/Scripts/phpIntegrityChecks/TestMethodPrefixChecker.phpnew+73 −0
- Build/Scripts/checkNamespaceIntegrity.phpdeleted+0 −287
- Build/Scripts/phpIntegrityChecker.phpnew+217 −0
- Build/Scripts/runTests.sh+3 −18
- Build/Scripts/testClassFinalChecker.phpdeleted+0 −88
- Build/Scripts/testMethodPrefixChecker.phpdeleted+0 −92
- composer.json+1 −0
Review log 3144
Show 1419 earlier messages
-
Anja Leichsenring uploaded patch set 1 03/22/24, 09:32
-
Anja Leichsenring updated the commit message in patch set 2 03/22/24, 09:33
-
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
-
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
-
Anja Leichsenring uploaded patch set 3
V -103/22/24, 09:43 -
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
-
Oliver Klee updated the commit message in patch set 4
V +103/22/24, 10:17 -
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
-
Simon Schaufelberger commented on patch set 4 03/22/24, 23:37
NamespaceChecker.php:213use early return -
Oliver Klee rebased onto patch set 5
V +105/15/24, 04:24 -
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
-
Andreas Kienast commented on patch set 5 05/15/24, 06:34
PhpIntegrityChecker.php:1Since 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:71Same here.AbstractPhpIntegrityChecker.php:33Please set 3rd argument to `true`.NamespaceChecker.php:214I 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. -
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]`. -
Anja Leichsenring commented on patch set 5 05/15/24, 07:23
Reply
emojis? Where do you see emojis?? -
Stefan Bürk commented on patch set 5 CR -1 05/15/24, 07:24
on it ... -
Andreas Kienast commented on patch set 5 05/15/24, 07:43
Reply
Just a few examples: ``` ❌ Following files were [...] ✅ Namespace integrity [...] ``` -
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. -
Stefan Bürk uploaded patch set 6
CR -1V +105/15/24, 12:14 -
Stefan Bürk commented on patch set 6 05/15/24, 12:14
Reply
DonePhpIntegrityChecker.php:1ReplyAdded the executable flag again on the file (and renamed it). Thus keeping the shebang line.PhpIntegrityChecker.php:62ReplyAck. 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:71ReplyAck. 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:33ReplyAck - done.NamespaceChecker.php:73ReplyDoneNamespaceChecker.php:213ReplyDoneNamespaceChecker.php:214ReplyUsed `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.
-
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
-
Stefan Bürk uploaded patch set 7 05/15/24, 12:20
Copied Votes: * Verified-1 (copy condition: "**changekind:NO_CHANGE**") -
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
-
Stefan Bürk uploaded patch set 8
V -105/15/24, 12:26 -
Stefan Bürk uploaded patch set 9 05/15/24, 12:29
-
Stefan Bürk uploaded patch set 10 05/15/24, 12:34
-
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
-
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
-
Stefan Bürk uploaded patch set 11 05/15/24, 12:35
-
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
-
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
-
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. -
Stefan Bürk voted on patch set 11 CR 0 V 0 05/15/24, 12:44
-
Stefan Bürk commented on patch set 11 05/15/24, 12:45
AbstractPhpIntegrityChecker.php:23I guess this should be not needed here ... -
Stefan Bürk uploaded patch set 12
V +105/15/24, 12:47 -
Stefan Bürk commented on patch set 12 05/15/24, 12:49
AbstractPhpIntegrityChecker.php:23ReplyDone -
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
-
Stefan Bürk voted on patch set 12 CR +1 V +1 05/15/24, 13:12
-
Simon Schaufelberger uploaded patch set 13
CR +1V +105/15/24, 21:19 -
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
-
Anja Leichsenring voted on patch set 13 CR +1 05/16/24, 05:35
-
Andreas Kienast voted on patch set 13 CR +1 05/16/24, 06:00
-
Andreas Kienast voted on patch set 13 V +1 05/16/24, 06:06
-
Stefan Bürk voted on patch set 13 CR +2 V +2 05/16/24, 06:15
-
Stefan Bürk merged patch set 14 05/16/24, 06:15
NamespaceChecker.php:73