-
Notifications
You must be signed in to change notification settings - Fork 52
Add non-parameter attribute rendering #135
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add non-parameter attribute rendering #135
Conversation
|
Thank you! I'd like the opinion of @TimWolla and @kocsismate about the generated XHTML |
|
I don't have an opinion. I trust that you generate XHTML that looks good 😄 |
|
Function attributes were not rendering properly and there was no test for them either so I just pushed a commit to fix this. |
|
I would prefer having a newline between every attribute as well. |
Yes, looks great to me. Thank you. |
Enable rendering of attributes for classes, exceptions, interfaces, methods and functions.
e434d42 to
e74ff2e
Compare
|
I've just pushed the commit to render every attribute on its own line (just like in the last set of screenshots). |
|
Thank you! I'll implement the required gen_stub.php related changes |
I believe this never happened, did it? |
|
In a perfect world, there wouldn't be the need for any changes to gen_stub.php; Docbook should ideally render indepent of the source code formatting. However, we're not living in a perfect world. Anyhow, do we even have classes etc. or functions with attributes that are documented. I could only find parameters, but their rendering shouldn't be affected anyway. |
I don't follow.
We have: All the attribute classes (and with PHP 8.4 all the deprecated functions and methods). The attribute markup is not yet included in the documentation, because of |
Ah, sorry, I misunderstood. I thought this was about rendering attributes on separate lines; and that shouldn't require changes to gen_stub.php (but would have had, if gen_stub.php would have already output DocBook with attributes on the same line).
And none bothered to improve gen_stub.php either. ;) My stance on automation: great to have it, but if none is available, do it manually, unless that is so much work, that you do the automation upfront. (hmm, guess I just volunteered ;) |
Oh, no, I believe I forgot about it at last. :( |
|
Finally I filed php/php-src#16926 :) |






Enable rendering of attributes for classes, exceptions, interfaces, methods and functions. The implementation feels a little off but it seems to work as intended (see attached test
attribute_formatting_002.phpt).I've also found a mistake I've made in the test
attribute_formatting_001.phptwhere the parameter attribute was outside of the<methodparam>element. I've corrected this by moving the attribute inside the element.