From cb3d048e0e97962bb214d1b104944c0e60d8120f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20M=C3=B6ller?= Date: Tue, 8 Dec 2020 12:33:01 +0100 Subject: [PATCH] Enhancement: Configure phpdoc_order_by_value fixer to order dataProvider annotations --- CHANGELOG.md | 2 ++ src/RuleSet/Php71.php | 1 + src/RuleSet/Php73.php | 1 + src/RuleSet/Php74.php | 1 + test/Unit/RuleSet/Php71Test.php | 1 + test/Unit/RuleSet/Php73Test.php | 1 + test/Unit/RuleSet/Php74Test.php | 1 + 7 files changed, 8 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 495dc20d..51b87ccc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ For a full diff see [`2.5.3...main`][2.5.3...main]. ### Changed * Updated `friendsofphp/php-cs-fixer` ([#255]), by [@localheinz] +* Configured `phpdoc_order_by_value` fixer to order `@dataProvider` annotations by value ([#257]), by [@localheinz] ## [`2.5.3`][2.5.3] @@ -187,6 +188,7 @@ For a full diff see [`d899e77...1.0.0`][d899e77...1.0.0]. [#241]: https://github.com/ergebnis/php-cs-fixer-config/pull/241 [#247]: https://github.com/ergebnis/php-cs-fixer-config/pull/247 [#255]: https://github.com/ergebnis/php-cs-fixer-config/pull/255 +[#257]: https://github.com/ergebnis/php-cs-fixer-config/pull/257 [@dependabot]: https://github.com/apps/dependabot [@linuxjuggler]: https://github.com/linuxjuggler diff --git a/src/RuleSet/Php71.php b/src/RuleSet/Php71.php index 70dff214..4e373942 100644 --- a/src/RuleSet/Php71.php +++ b/src/RuleSet/Php71.php @@ -302,6 +302,7 @@ final class Php71 extends AbstractRuleSet 'phpdoc_order_by_value' => [ 'annotations' => [ 'covers', + 'dataProvider', ], ], 'phpdoc_return_self_reference' => true, diff --git a/src/RuleSet/Php73.php b/src/RuleSet/Php73.php index a6480b94..019fc0e8 100644 --- a/src/RuleSet/Php73.php +++ b/src/RuleSet/Php73.php @@ -302,6 +302,7 @@ final class Php73 extends AbstractRuleSet 'phpdoc_order_by_value' => [ 'annotations' => [ 'covers', + 'dataProvider', ], ], 'phpdoc_return_self_reference' => true, diff --git a/src/RuleSet/Php74.php b/src/RuleSet/Php74.php index 49da0a2b..b2259200 100644 --- a/src/RuleSet/Php74.php +++ b/src/RuleSet/Php74.php @@ -302,6 +302,7 @@ final class Php74 extends AbstractRuleSet 'phpdoc_order_by_value' => [ 'annotations' => [ 'covers', + 'dataProvider', ], ], 'phpdoc_return_self_reference' => true, diff --git a/test/Unit/RuleSet/Php71Test.php b/test/Unit/RuleSet/Php71Test.php index b278d8f2..3d38c1c4 100644 --- a/test/Unit/RuleSet/Php71Test.php +++ b/test/Unit/RuleSet/Php71Test.php @@ -308,6 +308,7 @@ final class Php71Test extends AbstractRuleSetTestCase 'phpdoc_order_by_value' => [ 'annotations' => [ 'covers', + 'dataProvider', ], ], 'phpdoc_return_self_reference' => true, diff --git a/test/Unit/RuleSet/Php73Test.php b/test/Unit/RuleSet/Php73Test.php index a8800879..fd42fa22 100644 --- a/test/Unit/RuleSet/Php73Test.php +++ b/test/Unit/RuleSet/Php73Test.php @@ -308,6 +308,7 @@ final class Php73Test extends AbstractRuleSetTestCase 'phpdoc_order_by_value' => [ 'annotations' => [ 'covers', + 'dataProvider', ], ], 'phpdoc_return_self_reference' => true, diff --git a/test/Unit/RuleSet/Php74Test.php b/test/Unit/RuleSet/Php74Test.php index 5ee2df3d..e33b72aa 100644 --- a/test/Unit/RuleSet/Php74Test.php +++ b/test/Unit/RuleSet/Php74Test.php @@ -308,6 +308,7 @@ final class Php74Test extends AbstractRuleSetTestCase 'phpdoc_order_by_value' => [ 'annotations' => [ 'covers', + 'dataProvider', ], ], 'phpdoc_return_self_reference' => true,