Skip to content

feature: Introduce configurability to PhpdocSeparationFixer #6501

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

Conversation

kusab85
Copy link
Contributor

@kusab85 kusab85 commented Jul 19, 2022

Closes #5026.

Annotations in PHPDoc should be grouped together so that annotations of the same type immediately follow each other. Annotations of a different type are separated by a single blank line, except those specified in additional_groups option.

Configuration

  • groups - sets of annotation types to be grouped together.
    default value: [['deprecated', 'link', 'see', 'since'], ['author', 'copyright', 'license'], ['category', 'package', 'subpackage'], ['property', 'property-read', 'property-write']]

  • additional_groups - sets of additional annotation types to be grouped together.

  • psr_standard_tags_only - whether process PSR PHPDoc standard annotation tags only or any annotation tags

@kusab85 kusab85 force-pushed the feature-configurability-to-phpdoc-separation-fixer branch 5 times, most recently from b2a728e to dd9836c Compare July 21, 2022 13:05
@kusab85 kusab85 force-pushed the feature-configurability-to-phpdoc-separation-fixer branch from 98ac0a4 to 902e51d Compare July 22, 2022 10:08
@kusab85 kusab85 force-pushed the feature-configurability-to-phpdoc-separation-fixer branch 2 times, most recently from 919a1a5 to c0d0142 Compare July 25, 2022 08:53
@VincentLanglet
Copy link
Contributor

This would be great ; with #6466, it will close #5026

@kusab85 kusab85 force-pushed the feature-configurability-to-phpdoc-separation-fixer branch from c0d0142 to 1c1c701 Compare August 1, 2022 11:29
@kusab85 kusab85 force-pushed the feature-configurability-to-phpdoc-separation-fixer branch from 1c1c701 to 9aa4283 Compare August 8, 2022 06:44
@coveralls
Copy link

coveralls commented Aug 8, 2022

Coverage Status

Coverage increased (+0.008%) to 92.854% when pulling f2be031 on gdl2studio:feature-configurability-to-phpdoc-separation-fixer into ee15726 on FriendsOfPHP:master.

@kusab85 kusab85 force-pushed the feature-configurability-to-phpdoc-separation-fixer branch from 9aa4283 to 323967d Compare August 11, 2022 06:53
@kusab85 kusab85 force-pushed the feature-configurability-to-phpdoc-separation-fixer branch from 323967d to 7874a88 Compare August 16, 2022 10:21
@kusab85 kusab85 force-pushed the feature-configurability-to-phpdoc-separation-fixer branch from c454be0 to f2be031 Compare August 22, 2022 06:40
@julienfalque julienfalque merged commit a7ed665 into PHP-CS-Fixer:master Aug 24, 2022
@julienfalque
Copy link
Member

Thank you @kusab85, great work!

@jrmajor
Copy link
Contributor

jrmajor commented Aug 24, 2022

Thank you for this and #6466, I find docblock formatting to be particularly hard to maintain by hand :)

@kusab85
Copy link
Contributor Author

kusab85 commented Aug 24, 2022

You're welcome guys! ;-)

@kusab85 kusab85 deleted the feature-configurability-to-phpdoc-separation-fixer branch August 28, 2022 21:49
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.

Support custom phpdoc tag (like phpstan or psalm one) for phpdoc rules like order and separation
5 participants