phpDocumentor
phpDocumentor copied to clipboard
XML template leads to empty @see tags
* This class is created internally by {@see Google\Cloud\Vision\Annotation} and is used to represent various
* annotation feature results.
Leads to this with the XML template:
This class is created internally by {@see} and is used to represent various
annotation feature results.
It works with the default template:
<section class="phpdocumentor-description"><p>This class is created internally by <abbr title="\Google\Cloud\Vision\Annotation\Google\Cloud\Vision\Annotation">Annotation</abbr> and is used to represent various
annotation feature results.</p>
Is there a way to make the XML template include the @see tag? It works for some other tags, but many of them are missing.
Hi could you give this a try.
create in your project a file .phpdoc/template/docblock.xml.twig with the following content:
{# @var descriptor \phpDocumentor\Descriptor\DescriptorAbstract #}
<docblock line="{{ descriptor.line }}">
<description>{{ descriptor.summary }}</description>
<long-description>{{ descriptor.description | description }}</long-description>
{% for tags in descriptor.tags %}
{% for tag in tags %}
{% apply spaceless %}
<tag
name="{{ tag.name }}"
description="{{ tag.description | description }}"
{% if tag.link %} link="{{ tag.link }}"{% endif %}
{% if tag.version %} version="{{ tag.version }}"{% endif %}
{% if tag.reference %} link="{{ tag.reference }}"{% endif %}
{% if tag.variableName %} variable="{{ tag.variableName }}"{% endif %}
{% if tag.methodName %} method_name="{{ tag.methodName }}"{% endif %}
{% if tag.type %} type="{{ tag.type }}"{% endif %}/>
{% endapply %}
{% endfor %}
{% endfor %}
</docblock>
Then rerun phpdocumentor.
This will overwrite the way docblocks are rendered on your project in the xml.
I would like to hear if this fixes the issues you are facing.
Thanks! That leads to:
This class is created internally by <a href="classes/Google-Cloud-Vision-Annotation.html"><abbr title="\Google\Cloud\Vision\Annotation">Annotation</abbr></a> and is used
Is there a way to avoid the escaping? Or perhaps even leaving the @see unchanged (so I can resolve it after the fact)?