Review 11.5 Merged

73257[BUGFIX] Fix some incorrect usages of Prophecy

Stefan Bürk CR +2 V +2 Expert +276 −882 updated 02/01/22, 10:59

Commit message

With the following changes, we can get rid of a whole bunch
of warnings from the PHPStan baseline:

1. Now that we are using the Prophecy plugin for PHPStan,
   we don't need type annotations for prophecies anymore.
2. Prophecies are not instances of the prophesized classes.
   So we need to fix/remove type annotations that incorrectly
   state this, and also move accesses on properties from the
   prophecies to the revelations.
3. Revelations are not instances of ObjectProphecy. They
   implement ProphecySubjectInterface, but that usually is
   of no relevance to our test classes. So we can simplify
   the type annotations and usually convert those to native
   type annotations.
4. Have PHPStan ignore false positive related to class aliasing
   (that probably is outside of what PHPStan can do).
5. Drop extraneous arguments to Argument::any().

Review

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

Issues 1

Files 79

Show 59 more files

Review log 79

  1. Stefan Bürk uploaded patch set 1 02/01/22, 01:16

  2. core-ci voted on patch set 1 V -1 02/01/22, 01:29 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/22850

  3. Stefan Bürk uploaded patch set 2 02/01/22, 01:50

  4. Stefan Bürk uploaded patch set 3 02/01/22, 01:56

  5. core-ci voted on patch set 3 V +1 02/01/22, 02:05 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/22852

  6. Stefan Bürk voted on patch set 3 V +1 CR +1 02/01/22, 02:23

  7. Oliver Klee voted on patch set 3 V +1 CR +1 02/01/22, 09:43

  8. Christian Kuhn voted on patch set 3 V +2 CR +2 02/01/22, 10:58

  9. Christian Kuhn merged patch set 4 02/01/22, 10:59