Closed
Description
Symfony version(s) affected
7.3.0
Description
In 7.3 type info crashes when it encounters a doc block referencing other types.
The types are only for PHPStan or IDE auto completion and shouldn't have any significance to Symfony. The error occurs in a live component that has a service injected with such annotations.
Symfony\Component\TypeInfo\Exception\UnsupportedException
Cannot resolve "list<MyType>".
DomainException
Unhandled "MyType" identifier.
How to reproduce
Have type info parse the doc block of this class:
<?php
/**
* @phpstan-type MyType array{
* key1: string,
* key2?: bool,
* }
*
* @phpstan-type TypesList list<MyType>
*/
readonly class Example
{
}
Possible Solution
No response
Additional Context
No response