Review main Merged

80470[TASK] Replace usages of getMockForAbstractClass in EXT:core

Oliver Klee CR +2 V +2 Hard +443 −49 updated 08/10/23, 18:36

Commit message

`getMockForAbstractClass` has been (soft-)deprecated in PHPUnit 10.1:
https://github.com/sebastianbergmann/phpunit/issues/5241

Hence, we should replace its usages to follow best practices and
avoid deprecation warnings later with PHPUnit 11.

We do this by creating dedicated fixture subclasses of the affected
abstract classes.

Review

  • Code review CR +2 Done
    • Anja Leichsenring +2
    • Andreas Nedbal +1
    • Lina Wolf +1
    • Christian Kuhn +1
  • Verified V +2 Done
    • Anja Leichsenring +2
    • Andreas Nedbal +1
    • Lina Wolf +1
    • Christian Kuhn +1
    • core-ci +1 CI

Issues 2

Files 13

Review log 1520

  1. Oliver Klee uploaded patch set 1 08/09/23, 11:06

  2. Oliver Klee uploaded patch set 2 08/09/23, 11:08

  3. Oliver Klee wrote 08/09/23, 11:08

    Topic set to phpunit
  4. Oliver Klee commented on patch set 2 CR -1 08/09/23, 11:10

    On it.
  5. Oliver Klee uploaded patch set 3 CR -1 08/09/23, 11:13

  6. core-ci voted on patch set 1 V -1 08/09/23, 11:15 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/45277

  7. core-ci voted on patch set 2 V -1 08/09/23, 11:17 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/45278

  8. Oliver Klee uploaded patch set 4 08/09/23, 11:20

  9. core-ci voted on patch set 3 V -1 08/09/23, 11:20 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/45279

  10. core-ci voted on patch set 4 V +1 08/09/23, 11:26 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/45280

  11. Jörg Bösche voted on patch set 4 CR +1 08/10/23, 12:56

  12. Oliver Klee commented on patch set 4 08/10/23, 14:44

    How to verify: Check that the unit tests are green (e.g., in CI).
  13. Christian Kuhn commented on patch set 4 08/10/23, 15:09

    AbstractRepositoryTest.php:65

    let's remove it right away: findByUid() has an early canBeInterpretedAsInteger() ... there is little reason to create lots of fuzz about it with a test. Also, there is the above test that checks if the exception is thrown.
  14. Christian Kuhn uploaded patch set 5 CR +1 V +1 08/10/23, 15:11

  15. Christian Kuhn voted on patch set 5 V +1 CR +1 08/10/23, 15:19

  16. core-ci voted on patch set 5 V +1 08/10/23, 15:20 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/45345

  17. Lina Wolf commented on patch set 5 V +1 CR +1 08/10/23, 18:35

    Looks good, thanks for taking care of this
  18. Andreas Nedbal voted on patch set 5 V +1 CR +1 08/10/23, 18:36

  19. Anja Leichsenring voted on patch set 5 V +2 CR +2 08/10/23, 18:36

  20. Anja Leichsenring merged patch set 6 08/10/23, 18:36