Review main Merged

83160[TASK] Avoid phpunit getMockForAbstractClass()

Christian Kuhn CR +2 V +2 Expert +371 −656 updated 02/28/24, 14:08

Commit message

Deprecated with phpunit 11. Adapt to
fixture classes to test details of abstracts.

Review

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

Issues 1

Files 10

Review log 1215

  1. Christian Kuhn uploaded patch set 1 02/28/24, 13:30

  2. Christian Kuhn uploaded patch set 2 02/28/24, 13:33

  3. core-ci voted on patch set 1 V +1 02/28/24, 13:37 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/53686

  4. core-ci voted on patch set 2 V +1 02/28/24, 13:38 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/53687

  5. Oliver Klee commented on patch set 2 02/28/24, 13:56

    AbstractTypolinkBuilderFixture.php:31

    Can't we omit the constructor here and fully rely on the parent constructor?

    AbstractCoreMatcherFixture.php:31

    I'd prefer to have native type (param and return) declarations for all fixture subclasses as much as possible: The stricter, the better, as this helps both static type analysis as well as detect unexpected types at runtime.
  6. Oliver Klee commented on patch set 2 02/28/24, 13:57

    AbstractCoreMatcherFixture.php:31 Reply

    (even if the corresponding parent classes do not have strict types in all places yet)
  7. Christian Kuhn commented on patch set 2 02/28/24, 14:01

    AbstractTypolinkBuilderFixture.php:31 Reply

    Done

    AbstractCoreMatcherFixture.php:31 Reply

    i prefer to keep that for now to keep the classes in sync.
  8. Christian Kuhn uploaded patch set 3 V +1 02/28/24, 14:01

  9. Oliver Klee voted on patch set 3 CR +1 V +1 02/28/24, 14:05

  10. Christian Kuhn commented on patch set 3 02/28/24, 14:06

    AbstractCoreMatcherFixture.php:31 Reply

    maybe some more words: i think it's benefitial when those 'make stuff public' fixtures deviate from the SuT as little as possible: imho, we should only change signatures when the SuT is changed as well.
  11. Anja Leichsenring voted on patch set 3 CR +2 V +2 02/28/24, 14:07

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

  13. Stefan Bürk voted on patch set 3 CR +1 V +1 02/28/24, 14:07

  14. Christian Kuhn voted on patch set 3 CR +2 V +2 02/28/24, 14:08

  15. Christian Kuhn merged patch set 4 02/28/24, 14:08