Symfony version(s) affected
8.0.5
Description
PHPdoc annotation in \Symfony\Component\ObjectMapper\Attribute\Map constructor for $if parameter does not include \Symfony\Component\ObjectMapper\Condition\TargetClass as allowed type.
PHPStan error:
Parameter $if of attribute class Symfony\Component\ObjectMapper\Attribute\Map constructor expects bool|(callable(mixed, object): bool)|string|null, Symfony\Component\ObjectMapper\Condition\TargetClass<App\ExampleClass> given.
How to reproduce
Using if with TargetClass in Map attribute.
Example:
#[Map(if: new TargetClass(ExampleClass::class))]
Possible Solution
No response
Additional Context
No response
Symfony version(s) affected
8.0.5
Description
PHPdoc annotation in \Symfony\Component\ObjectMapper\Attribute\Map constructor for $if parameter does not include \Symfony\Component\ObjectMapper\Condition\TargetClass as allowed type.
PHPStan error:
Parameter $if of attribute class Symfony\Component\ObjectMapper\Attribute\Map constructor expects bool|(callable(mixed, object): bool)|string|null, Symfony\Component\ObjectMapper\Condition\TargetClass<App\ExampleClass> given.How to reproduce
Using if with
TargetClassinMapattribute.Example:
#[Map(if: new TargetClass(ExampleClass::class))]
Possible Solution
No response
Additional Context
No response