Review main Merged

92264[TASK] Handle phpstan baseline entries for extbase unit tests

Torben Hansen CR +2 V +2 Hard +78 −251 updated 01/09/26, 14:04

Commit message

This change handles all extbase unit test related phpstan
baseline entries by:

- Adapting a doc comment type declaration in `CacheService`
- Using real objects instead of mocks in `ResultTest`
- Removing superfluous `assertInstanceOf` assertations
- Using `@phpstan-ignore-next-line` where suitable
- Improving type declarations in `ClassSchemaTest`
- Avoiding `ArrayObject` key/value assignment
- Adding proper type doc comments in `ExtensionUtilityTest`

Review

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

Issues 1

Files 15

Review log 912

  1. Torben Hansen uploaded patch set 1 01/09/26, 06:54

  2. core-ci voted on patch set 1 V -1 01/09/26, 07:01 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/93134

  3. Torben Hansen uploaded patch set 2 V -1 01/09/26, 07:14

  4. core-ci voted on patch set 2 V +1 01/09/26, 07:23 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/93135

  5. Oliver Klee commented on patch set 2 V +1 01/09/26, 09:03

    ResultTest.php:47

    As we're renaming the method anyway, I suggest we rename it to describe what it does more closely: ```suggestion private function createMessage(string $type): Error|Warning|Notice ```

    ArgumentsTest.php:213

    Could we add the type of warning here to narrow down the blocklisting?

    ClassSchemaTest.php:136

    Does this PHPDoc type annotation then still make sense, or should we remove it?
  6. Torben Hansen uploaded patch set 3 V +1 01/09/26, 09:19

  7. Torben Hansen commented on patch set 3 01/09/26, 09:20

    ResultTest.php:47 Reply

    Done

    ArgumentsTest.php:213 Reply

    Done

    ClassSchemaTest.php:136 Reply

    The test tests, if class schema resolves the type from method parameter. If this would not be the case, the type `ClassSchema` would be returned. Therefore, the type annotation must remain here.
  8. Oliver Klee commented on patch set 3 CR +1 V +1 01/09/26, 09:22

    ClassSchemaTest.php:136 Reply

    Ah, I see. Thanks for the background explanation!
  9. core-ci voted on patch set 3 V +1 01/09/26, 09:27 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/93140

  10. Simon Schaufelberger voted on patch set 3 CR +1 V +1 01/09/26, 10:32

  11. Benni Mack voted on patch set 3 CR +2 V +2 01/09/26, 14:03

  12. Benni Mack merged patch set 4 01/09/26, 14:04