code-lts / doctum

A php API documentation generator, fork of Sami
https://doctum.long-term.support/
MIT License
300 stars 32 forks source link

Supporting the `@group` / `@category` tags #53

Closed tillkruss closed 1 year ago

tillkruss commented 2 years ago

We use the @group tag to indicate which groups a method belongs to, since @category was deprecated.

Is this something you'd be open to support inside Doctum optionally, or should we use our own theme to display that tag?

Either unofficial @group, or the old @category.

williamdes commented 2 years ago

Hi !

I am open to supporting such tags if you can find me some documentation that explains the use or the tags, examples or code samples. Just to be sure I do not implement something that is too much custom. Like if you can find some different projects that use it for example :) Never heard of then but open to learn more !

tillkruss commented 2 years ago

The @group tag is rather custom. I only only of PHPUnit using it: https://phpunit.readthedocs.io/en/9.5/annotations.html

The @category is widely used, but officially deprecated, that would be less "custom" and reasonable to support IMO: https://docs.phpdoc.org/3.0/guide/references/phpdoc/tags/category.html

The is no replacement for @category, essentially there is no standard to "tag" a method with keywords.

I'm happy to open a PR, since we got it working in a custom theme.

image

williamdes commented 2 years ago

Thank you for the details, let's add support for it I think you can open a PR

tillkruss commented 2 years ago

For @category or @group?

williamdes commented 2 years ago

For @category or @group?

We could assume group is an alias of category in the code?