phpDocumentor / ReflectionDocBlock

MIT License
9.35k stars 119 forks source link

[DEPRECATION] Param tags without name #362

Open jaapio opened 7 months ago

jaapio commented 7 months ago

@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
williamdes commented 7 months ago

And reported as invalid items I guess ?

jaapio commented 7 months ago

Yes these will be reported as InvalidTag

norkunas commented 6 months ago

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

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

williamdes commented 6 months ago

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 😁

jaapio commented 6 months ago

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