-
-
Notifications
You must be signed in to change notification settings - Fork 640
Closed
Description
#When using the clean template @uses references are not displayed unless a description is provided.
Steps to Replicate:
- Create function and add a DocBlock with the @uses tag like:
/**
* Method to show bug with uses tag in phpDocumentor
*
* @access public
* @uses SomeNamespace\SomeClass::SomeMethod()
* @return void
*/
- Generate documentation using the clean template
- Navigate to the method in generated documentation and note in the sidebar an empty uses
- Update the DocBlock as follows
/**
* Method to show bug with uses tag in phpDocumentor
*
* @access public
* @uses SomeNamespace\SomeClass::SomeMethod() Now you can see me!
* @return void
*/
- Generate documentation using the clean template.
- Navigate to the method in generated documentation and note in the sidebar the uses is populated with "Now you can see me!" and clicking will navigate to SomeNamespace\SomeClass::SomeMethod()
- Update the DocBlock to the one in step 1 above.
- Generate documentation using the default template
- Navigate to the method in generated documentation and note proper reference of @uses
Suggested Fix:
It appears that the issue is due to the template using the @uses description rather than the tag itself when rendering. Fixing the template to use the tag itself should resolve the issue.
I anticipate the code site in question is here:
phpDocumentor/data/templates/clean/parts/elements/property.html.twig
Lines 42 to 49 in 7b7ae43
| {# Uses Section #} | |
| {% set uses_tags = property.tags['uses'] %} | |
| {% if uses_tags is not empty %} | |
| <dt>Uses</dt> | |
| {% for tag in uses_tags %} | |
| <dd><a href="{{ tag.reference|route('url') }}"><span class="namespace-wrapper">{{ tag.description ?: tag.reference }}</span></a></dd> | |
| {% endfor %} | |
| {% endif %} |
Version: phpDocumentor v3.8.0
Search Tags:
- phpdocumentor @uses
- phpdocumentor uses not working
- phpdocumentor uses not rendering
- phpdocumentor uses display bug
- phpdocumentor uses template bug
Metadata
Metadata
Assignees
Labels
No labels