phpDocumentor / phpDocumentor/phpDocumentor
Seeing unexpected/possibly faulty HTML class tags in the output
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 4.3k
- Forks
- 648
- Avg merge
- 28m
- Merged PRs (30d)
- 13
Description
Expected behavior
- No class tags when there are no classes for a certain HTML element
- No class names starting with a
-.
Actual behavior
The diffs are compared to phpDocumenter 3.4.3
- No class tags when there are no classes for a certain HTML element
- <a href="classes/WpOrg-Requests-Auth.html#method_register">register()</a>
+ <a class="" href="classes/WpOrg-Requests-Auth.html#method_register">register()</a>
The class="" is redundant.
- No class names starting with a
-.
- <section class="phpdocumentor-sidebar__category">
+ <section class="phpdocumentor-sidebar__category -namespaces">
I'd expect the class name either to be phpdocumentor-sidebar__category-namespaces - i.e. without the space before the - - or this to be two class names and the second class name to not start with a -.
While the above may be intentional, to a casual onlooker, like me, it looks like an error.
Steps to reproduce the problem
The issue can be seen in this PR: https://github.com/WordPress/Requests/pull/883 which was created by this build: https://github.com/WordPress/Requests/actions/runs/9835949221 using this workflow: https://github.com/WordPress/Requests/blob/develop/.github/workflows/update-website.yml
Your environment
- Version used: 3.5.2
- Install method: PHAR (via setup-php)
- PHP version: 8.1.29
- Operating system and version: Ubuntu 22.04.4 (
ubuntu-lateston GHA) - Link to your project: https://github.com/WordPress/Requests/
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the generated output from WordPress/Requests PR 883 using the .github/workflows/update-website.yml workflow, then trace the phpDocumentor 3.5.2 template or rendering path responsible. Done means empty class attributes are omitted and generated class names do not begin with a hyphen, with the output verified against the reported examples.
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