-
-
Notifications
You must be signed in to change notification settings - Fork 74
Closed
Description
Bug Report
| Q | A |
|---|---|
| Version | all since 2.1 |
Summary
In php 8.4+ ReflectionClass lost his template-covariant annotation because of proxy methods,
see phpstan/phpstan-src@25ec5eb
This means that an interface which has a method returning ReflectionClass<T> cannot be use a covariant template too.
Expected behavior
I assume doctrine should
- Change
template-covariantintotemplateforpersistence/src/Mapping/ClassMetadata.php
Line 12 in 00bd9cc
* @template-covariant T of object - Change the same for classes implementings the ClassMetadata interface (in ORM and ODM)
Related issue on phpstan-doctrine
phpstan/phpstan-doctrine#646
and PR phpstan/phpstan-doctrine#663
(Maybe ondrej will have a better answer/solution ?)
How to reproduce
I assume the error will happen on the doctrine codebase as soon as you will target a PHP version higher or equal to 8.4,
but currently you're on 8.1 for phpstan
Line 9 in 00bd9cc
| phpVersion: 80100 |
mroeling
Metadata
Metadata
Assignees
Labels
No labels