phpDocumentor / phpDocumentor/phpDocumentor

uses tag not work

Open
#2,913 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

rfc
Dominant language
PHP
Stars
4.3k
Forks
648
Avg merge
28m
Merged PRs (30d)
13

Description

https://manual.phpdoc.org/HTMLSmartyConverter/PHP/phpDocumentor/tutorial_tags.uses.pkg.html
"The @uses tag automatically creates a virtual @usedby tag in the other documentation that links to the documentation containing the @uses tag. In other words, it is exactly like @see, except a return link is added automatically."

`
//classes.php
class A {
/**
* @uses B::b()
*/
function a(){}
}
class B {
function b(){}
}

$ php -l classes.php && phpdoc -f classes.php -t docs
No syntax errors detected in classes.php
phpDocumentor v3.0.0

Parsing files
...
`
I checked the page docs/classes/B.html#method_b and I see that there is no reference (@usedby) to A::a().
Why?

Contributor guide

Open the contributing guide

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 with the @uses example in classes.php and reproduce it with phpdoc -f classes.php -t docs. Inspect docs/classes/B.html#method_b for the missing @usedby reference and trace how phpDocumentor handles the link. Done means the generated documentation for B::b() references A::a() as described.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
documentation
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 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.