Skip to content

Deprecate @synopsis tag?#755

Merged
scribu merged 3 commits into
masterfrom
deprecate-synopsis-tag
Sep 12, 2013
Merged

Deprecate @synopsis tag?#755
scribu merged 3 commits into
masterfrom
deprecate-synopsis-tag

Conversation

@scribu
Copy link
Copy Markdown
Member

@scribu scribu commented Sep 11, 2013

Since we moved the parameter descriptions inline (#548), I noticed that the information is split between the @synopsis tag and the longdesc section:

  • the synopsis contains optionality (optional/mandatory) and cardinality (one, many)
  • the longdesc contains the description
  • both contain the key (and value) name

The duplication is annoying and the @synopsis tag tends to get too long.

Would it be feasible to move (and then parse back out) all the info to the longdesc section and deprecate the @synopsis tag?

@danielbachhuber
Copy link
Copy Markdown
Member

And offer backwards compat for all of the community commands that use @synopsis?

@scribu
Copy link
Copy Markdown
Member Author

scribu commented Sep 10, 2013

Of course.

@scribu
Copy link
Copy Markdown
Member Author

scribu commented Sep 11, 2013

I'm thinking of making SynopsisParser return a Synopsis object, instead of a plain array.

LE: On the other hand, there's a case to be made for the convenience of inspecting the array directly.

The idea is to not display invalid tokens when doing wp help core download, for example.

@scribu
Copy link
Copy Markdown
Member Author

scribu commented Sep 11, 2013

Some bundled commands, like cache, only have a synopsis tag and no longdesc. Going to leave those as-is.

@scribu
Copy link
Copy Markdown
Member Author

scribu commented Sep 11, 2013

The option and *-meta subcommands are an interesting case, since the arguments are described in the class docblock, not in the method docblock.

@scribu
Copy link
Copy Markdown
Member Author

scribu commented Sep 12, 2013

Since this has the potential to get stale very quickly, going to merge as-is and fix issues as they come up.

scribu pushed a commit that referenced this pull request Sep 12, 2013
@scribu scribu merged commit fd1becd into master Sep 12, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants