ReflectionDocBlock icon indicating copy to clipboard operation
ReflectionDocBlock copied to clipboard

[DEPRECATION] Param tags without name

Open jaapio opened this issue 1 year ago • 6 comments

@param tag should always have a variable name in it's body, support for params without variable names will be dropped.

Supported formats will be: (option 3 does not really make any sense, but will be covered)

@param $var your description here
@param MyType $var your description
@param $var
@param MyType $var

Unsupported after this deprecation has been removed:

@param MyType your description here
@param MyType

jaapio avatar Mar 20 '24 21:03 jaapio

And reported as invalid items I guess ?

williamdes avatar Apr 06 '24 12:04 williamdes

Yes these will be reported as InvalidTag

jaapio avatar Apr 08 '24 20:04 jaapio

support for params without type ... will be dropped.

so basically this is opposite to https://github.com/symfony/symfony/pull/54523 ?

norkunas avatar Apr 12 '24 04:04 norkunas

support for params without type ... will be dropped.

so basically this is opposite to symfony/symfony#54523 ?

the linked PR feels wrong, the types should always be present If the param do not document anything (type hints exist), drop them But if they do have a description, keep them in sync with native hints

Anyway, that's only my point of view 😁

williamdes avatar Apr 12 '24 06:04 williamdes

Types are optional. I just noticed that the description of this issue is wrong. Thanks for the headsup @norkunas

jaapio avatar Apr 12 '24 07:04 jaapio