WordPress / WordPress/phpdoc-parser

Deprecated parameter handling

Open
#140 7 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug enhancement
Dominant language
PHP
Stars
239
Forks
81
Avg merge
16h 29m
Merged PRs (30d)
8

Description

Per now the devhub doesn't play well with deprecated parameters for function calls, an example of this would be the get_the_author function which used to have a parameter.

The parser currently picks these up as Required, which is a little bit unlucky.

Deprecated parameters seem to consistently be defined with @param $var Deprecated, so detecting these shouldn't be an issue, but how should we relay that to the user in a clear manner, and in such a way that it doesn't accidentally get read as the whole function being deprecated which the current use of $deprecated as the parameter name might lead to.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing how the parser handles @param entries, using the get_the_author example and the documented Deprecated parameter pattern as entry points. Review the issue discussion for the intended user-facing wording; done means deprecated parameters are not classified as Required and are presented distinctly without implying that the whole function is deprecated.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
documentation
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.