Skip to content

Commit

Permalink
Merge pull request #1060 from ergebnis/feature/ordered-attributes
Browse files Browse the repository at this point in the history
Enhancement: Enable and configure `ordered_attributes` fixer
  • Loading branch information
localheinz committed May 7, 2024
2 parents 9e2578b + 9ddfb0e commit 29ff5ef
Show file tree
Hide file tree
Showing 9 changed files with 34 additions and 8 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
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
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
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
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
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
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
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
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
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 29ff5ef

Please sign in to comment.