Skip to content
Snippets Groups Projects
Commit 1f0ec495 authored by Benjamin Franzke's avatar Benjamin Franzke
Browse files

[TASK] Use generics for ObjectProphecy class properties

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.

Resolves: #96725
Related: #96713
Releases: main, 11.5
Change-Id: I2aa2f4b83675e831b42b940914ac5830a48f2994
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/73263


Tested-by: default avatarcore-ci <typo3@b13.com>
Tested-by: default avatarBenjamin Franzke <bfr@qbus.de>
Reviewed-by: default avatarBenjamin Franzke <bfr@qbus.de>
parent 090f1874
Branches
Tags
No related merge requests found
Showing
with 37 additions and 15 deletions
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment