phpstan-symfony icon indicating copy to clipboard operation
phpstan-symfony copied to clipboard

DI parameters that contain a list are not reported as a list

Open stof opened this issue 1 year ago • 0 comments

When using $container->getParameter('parameter_containing_a_list'), the type provided by the extension is array<int, T> (with the appropriate type for T). This causes issues when running phpstan in bleeding and passing that value to a function expecting list<T>.

It would be great if the extension could report the type as list<T> when the parameter value is a list.

stof avatar Sep 11 '24 21:09 stof