Skip to content

Commit

Permalink
Enhancement: Enable and configure ordered_attributes fixer
Browse files Browse the repository at this point in the history
  • Loading branch information
localheinz committed May 7, 2024
1 parent 9e2578b commit 9ddfb0e
Show file tree
Hide file tree
Showing 9 changed files with 34 additions and 8 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ For a full diff see [`6.26.0...main`][6.26.0...main].
### Changed

- Updated `friendsofphp/php-cs-fixer` ([#1058]), by [@dependabot]
- Enabled and configured the `ordered_attributes` fixer ([#1060]), by [@localheinz]

## [`6.26.0`][6.26.0]

Expand Down Expand Up @@ -1615,6 +1616,7 @@ For a full diff see [`d899e77...1.0.0`][d899e77...1.0.0].
[#1039]: https://github.com/ergebnis/php-cs-fixer-config/pull/1039
[#1051]: https://github.com/ergebnis/php-cs-fixer-config/pull/1051
[#1058]: https://github.com/ergebnis/php-cs-fixer-config/pull/1058
[#1060]: https://github.com/ergebnis/php-cs-fixer-config/pull/1060

[@dependabot]: https://github.com/apps/dependabot
[@linuxjuggler]: https://github.com/linuxjuggler
Expand Down
5 changes: 4 additions & 1 deletion src/RuleSet/Php80.php
Original file line number Diff line number Diff line change
Expand Up @@ -452,7 +452,10 @@ public static function create(): RuleSet
'only_booleans' => true,
'position' => 'beginning',
],
'ordered_attributes' => false,
'ordered_attributes' => [
'order' => [],
'sort_algorithm' => 'alpha',
],
'ordered_class_elements' => [
'case_sensitive' => false,
'order' => [
Expand Down
5 changes: 4 additions & 1 deletion src/RuleSet/Php81.php
Original file line number Diff line number Diff line change
Expand Up @@ -453,7 +453,10 @@ public static function create(): RuleSet
'only_booleans' => true,
'position' => 'beginning',
],
'ordered_attributes' => false,
'ordered_attributes' => [
'order' => [],
'sort_algorithm' => 'alpha',
],
'ordered_class_elements' => [
'case_sensitive' => false,
'order' => [
Expand Down
5 changes: 4 additions & 1 deletion src/RuleSet/Php82.php
Original file line number Diff line number Diff line change
Expand Up @@ -453,7 +453,10 @@ public static function create(): RuleSet
'only_booleans' => true,
'position' => 'beginning',
],
'ordered_attributes' => false,
'ordered_attributes' => [
'order' => [],
'sort_algorithm' => 'alpha',
],
'ordered_class_elements' => [
'case_sensitive' => false,
'order' => [
Expand Down
5 changes: 4 additions & 1 deletion src/RuleSet/Php83.php
Original file line number Diff line number Diff line change
Expand Up @@ -453,7 +453,10 @@ public static function create(): RuleSet
'only_booleans' => true,
'position' => 'beginning',
],
'ordered_attributes' => false,
'ordered_attributes' => [
'order' => [],
'sort_algorithm' => 'alpha',
],
'ordered_class_elements' => [
'case_sensitive' => false,
'order' => [
Expand Down
5 changes: 4 additions & 1 deletion test/Unit/RuleSet/Php80Test.php
Original file line number Diff line number Diff line change
Expand Up @@ -475,7 +475,10 @@ protected function expectedRules(): Rules
'only_booleans' => true,
'position' => 'beginning',
],
'ordered_attributes' => false,
'ordered_attributes' => [
'order' => [],
'sort_algorithm' => 'alpha',
],
'ordered_class_elements' => [
'case_sensitive' => false,
'order' => [
Expand Down
5 changes: 4 additions & 1 deletion test/Unit/RuleSet/Php81Test.php
Original file line number Diff line number Diff line change
Expand Up @@ -476,7 +476,10 @@ protected function expectedRules(): Rules
'only_booleans' => true,
'position' => 'beginning',
],
'ordered_attributes' => false,
'ordered_attributes' => [
'order' => [],
'sort_algorithm' => 'alpha',
],
'ordered_class_elements' => [
'case_sensitive' => false,
'order' => [
Expand Down
5 changes: 4 additions & 1 deletion test/Unit/RuleSet/Php82Test.php
Original file line number Diff line number Diff line change
Expand Up @@ -476,7 +476,10 @@ protected function expectedRules(): Rules
'only_booleans' => true,
'position' => 'beginning',
],
'ordered_attributes' => false,
'ordered_attributes' => [
'order' => [],
'sort_algorithm' => 'alpha',
],
'ordered_class_elements' => [
'case_sensitive' => false,
'order' => [
Expand Down
5 changes: 4 additions & 1 deletion test/Unit/RuleSet/Php83Test.php
Original file line number Diff line number Diff line change
Expand Up @@ -476,7 +476,10 @@ protected function expectedRules(): Rules
'only_booleans' => true,
'position' => 'beginning',
],
'ordered_attributes' => false,
'ordered_attributes' => [
'order' => [],
'sort_algorithm' => 'alpha',
],
'ordered_class_elements' => [
'case_sensitive' => false,
'order' => [
Expand Down

0 comments on commit 9ddfb0e

Please sign in to comment.