-
Notifications
You must be signed in to change notification settings - Fork 79
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
Parse array parameter docs #119
Comments
Actually the parameters are not markdown list, but more of a case of special formatting. Not sure what is it based on / called properly. :)
|
This is the way that hashes are described in PHPDoc PSR-5: https://github.com/phpDocumentor/fig-standards/blob/master/proposed/phpdoc.md#7-describing-hashes I’m not sure if PHPDocumentor can parse this out yet or not. Worth investigating. |
It can't. I talked briefly about it with @mvriel (phpDoc maintainer). I talked to the guy from hookr.io at wcnyc about parsing hash notations and he mentioned he might have some code that he could contribute. |
Hi @DrewAPicture, you are right; phpDocumentor currently does not yet support this construct because PSR-5 is still in draft and under discussion. Adding that feature would be a bit premature and take time to improve the way phpDocumentor is and the feature requests that are still waiting in queue |
So, should we wait on it for DevHub? Is there estimate for PSR-5 finalization (thinking aloud, I will go look myself tomorrow, about to go off for the night) ? PS I am very not used to WP being too early for PHP stuff :D |
I think that it would be good to wait for such changes until the PSR is at least less in flux. For example, only two or three weeks ago we had to scrap the plan to deprecate There is no timetable set; I try to regularly write missing chapters or finalize discussions but work on phpDocumentor comes first and my personal life before that even :) (though my wife might feel otherwise sometimes) |
The changes are already in place in core right now. And while we absolutely wish to follow the standard (proposed or not) as closely as possible going forward, we have (and have had for some time) a demonstrated need for documenting default arguments in this way. The fact that the change is proposed at all is a step in the right direction, I think we can all agree on that. It's also entirely understandable that the hashes/hash notation section of the spec is not yet a top priority for you guys (@mvriel et al), though you should understand that it is one of ours. And thus, waiting an indeterminate amount of time for a decision to be made is holding up the show on our end. Please don't misunderstand, this is not a call to "please make this your priority". This is me saying, "we have this need and I'd like to explore our options", nothing more. Obviously, any code resulting from these explorations is going to be open source, and would certainly be up for contribution to phpDocumentor should we figure out a good way to do it. And later, if what comes out of the PSR-5 is demonstrably different in syntax, we can tackle that when we get there. Having to change inline docs and how they're formatted is a way of life in WordPress core. |
Looks like this was fixed at some point, but I'm not sure where, and I can't see any test coverage for it. Is there some post-processing happening on developer.wordpress.org? For example, wp_list_comments() has hash notation for its |
I... don't remember. :) Production reference does run some hacks (I had never seen myself) on top of Parser, but I doubt it's anything as extensive as dealing with those lists. A little busy with other things right now to de-dust my Parser setup and test. |
@johnbillion @Rarst: Yes, there's still some text processing going on on the front-end to give it halfway decent formatting. See cc @coffee2code |
Some of the parameter docs use lists. Markdown needs to be parsed in parameter docs.
See this for reference: https://meta.trac.wordpress.org/ticket/197
The text was updated successfully, but these errors were encountered: