You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Feature description or problem with existing feature
First of all, thank you for creating such an amazing tool! Intelephense has been incredibly helpful for my PHP development.
Currently, I noticed that Intelephense doesn't support @template T of array{foo: int} in PHPDoc comments. adding support for it would make Intelephense even more powerful and compatible with modern PHP practices.
Describe the solution you'd like
I would love to see Intelephense support parsing and understanding @template T of array{foo: int} syntax in PHPDoc comments. Specifically:
Recognize and validate the structure of arrays defined with this syntax.
Provide accurate type inference and autocompletion when such templates are used in functions or classes.
/** * @template T of array{foo: int} * * @param T $foo * @return int */functionfoo($foo)
{
return$foo['foo'];
}
Additional context
Thank you for considering this request, and I truly appreciate all the effort that goes into maintaining and improving this tool.
Currently, when using @template T of array{foo: int} in PHPDoc comments and applying it to a function, Intelephense infers the parameter and return types as mixed. This can be seen in the attached screenshot:
The text was updated successfully, but these errors were encountered:
Feature description or problem with existing feature
First of all, thank you for creating such an amazing tool! Intelephense has been incredibly helpful for my PHP development.
Currently, I noticed that Intelephense doesn't support
@template T of array{foo: int}
in PHPDoc comments. adding support for it would make Intelephense even more powerful and compatible with modern PHP practices.Describe the solution you'd like
I would love to see Intelephense support parsing and understanding
@template T of array{foo: int}
syntax in PHPDoc comments. Specifically:Additional context
Thank you for considering this request, and I truly appreciate all the effort that goes into maintaining and improving this tool.
Currently, when using
@template T of array{foo: int}
in PHPDoc comments and applying it to a function, Intelephense infers the parameter and return types asmixed
. This can be seen in the attached screenshot:The text was updated successfully, but these errors were encountered: