Review 11.5 Merged

73263[TASK] Use generics for ObjectProphecy class properties

Benjamin Franzke CR +2 V +2 Normal +78 −15 updated 02/03/22, 08:10

Commit message

With #96713 all type annotations on class properties
in tests have been reduced to ObjectProphecy only,
removing the information which class or interface
is mocked. This means that phpstan no longer
throws errors for valid cases but also ignored
invalid calls as the type effectively is considered
a mixed type.

The jangregor/phpstan-prophecy plugin defines ObjectProphecy
as a generic tag, allowing generics to be used and
resolved by PHPStan. Therefore the type annotations
on class properties or function results are now re-added
using generic syntax.

Review

  • Code review CR +2

    Imported before Forger kept the single votes, the next import adds them.

  • Verified V +2

    Imported before Forger kept the single votes, the next import adds them.

Issues 2

Files 40

Show 20 more files