From 1fea799f5a3bc907b61e400fde1f22894c5945a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20M=C3=B6ller?= Date: Tue, 11 Apr 2023 19:32:21 +0200 Subject: [PATCH] Enhancement: Configure phpdoc_separation fixer to group deprecated annotations into a separate group --- CHANGELOG.md | 5 +++++ src/RuleSet/Php80.php | 2 ++ src/RuleSet/Php81.php | 2 ++ src/RuleSet/Php82.php | 2 ++ test/Unit/RuleSet/Php80Test.php | 2 ++ test/Unit/RuleSet/Php81Test.php | 2 ++ test/Unit/RuleSet/Php82Test.php | 2 ++ 7 files changed, 17 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index a89f3f13..9b2ab364 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), For a full diff see [`5.4.0...main`][5.4.0...main]. +### Changed + +- Configured `phpdoc_separation` fixer to group `@deprecated` annotations into a separate group ([#751]), by [@localheinz] + ## [`5.4.0`][5.4.0] For a full diff see [`5.3.3...5.4.0`][5.3.3...5.4.0]. @@ -904,6 +908,7 @@ For a full diff see [`d899e77...1.0.0`][d899e77...1.0.0]. [#746]: https://github.com/ergebnis/php-cs-fixer-config/pull/746 [#747]: https://github.com/ergebnis/php-cs-fixer-config/pull/747 [#748]: https://github.com/ergebnis/php-cs-fixer-config/pull/748 +[#751]: https://github.com/ergebnis/php-cs-fixer-config/pull/751 [@dependabot]: https://github.com/apps/dependabot [@linuxjuggler]: https://github.com/linuxjuggler diff --git a/src/RuleSet/Php80.php b/src/RuleSet/Php80.php index 8eb135cc..43f25634 100644 --- a/src/RuleSet/Php80.php +++ b/src/RuleSet/Php80.php @@ -590,6 +590,8 @@ final class Php80 extends AbstractRuleSet implements ExplicitRuleSet 'groups' => [ [ 'deprecated', + ], + [ 'link', 'see', 'since', diff --git a/src/RuleSet/Php81.php b/src/RuleSet/Php81.php index a653278f..c985380c 100644 --- a/src/RuleSet/Php81.php +++ b/src/RuleSet/Php81.php @@ -591,6 +591,8 @@ final class Php81 extends AbstractRuleSet implements ExplicitRuleSet 'groups' => [ [ 'deprecated', + ], + [ 'link', 'see', 'since', diff --git a/src/RuleSet/Php82.php b/src/RuleSet/Php82.php index 16b467b1..159c673c 100644 --- a/src/RuleSet/Php82.php +++ b/src/RuleSet/Php82.php @@ -591,6 +591,8 @@ final class Php82 extends AbstractRuleSet implements ExplicitRuleSet 'groups' => [ [ 'deprecated', + ], + [ 'link', 'see', 'since', diff --git a/test/Unit/RuleSet/Php80Test.php b/test/Unit/RuleSet/Php80Test.php index 25543777..014631d9 100644 --- a/test/Unit/RuleSet/Php80Test.php +++ b/test/Unit/RuleSet/Php80Test.php @@ -596,6 +596,8 @@ final class Php80Test extends ExplicitRuleSetTestCase 'groups' => [ [ 'deprecated', + ], + [ 'link', 'see', 'since', diff --git a/test/Unit/RuleSet/Php81Test.php b/test/Unit/RuleSet/Php81Test.php index 445abf01..7879fc0f 100644 --- a/test/Unit/RuleSet/Php81Test.php +++ b/test/Unit/RuleSet/Php81Test.php @@ -597,6 +597,8 @@ final class Php81Test extends ExplicitRuleSetTestCase 'groups' => [ [ 'deprecated', + ], + [ 'link', 'see', 'since', diff --git a/test/Unit/RuleSet/Php82Test.php b/test/Unit/RuleSet/Php82Test.php index 578b81ed..b02a9020 100644 --- a/test/Unit/RuleSet/Php82Test.php +++ b/test/Unit/RuleSet/Php82Test.php @@ -597,6 +597,8 @@ final class Php82Test extends ExplicitRuleSetTestCase 'groups' => [ [ 'deprecated', + ], + [ 'link', 'see', 'since',