Skip to content

Commit cb76a5f

Browse files
authored
[dx] enable all attributes, if none are selected to streamline config (#6451)
1 parent 4425eb5 commit cb76a5f

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

rector.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
rectorPreset: true,
2222
phpunitCodeQuality: true
2323
)
24+
->withAttributesSets()
2425
->withComposerBased(phpunit: true)
2526
->withPhpSets()
2627
->withPaths([

src/Configuration/RectorConfigBuilder.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -447,6 +447,11 @@ public function withAttributesSets(
447447
bool $sensiolabs = false,
448448
bool $all = false
449449
): self {
450+
// if nothing is passed, enable all as convention in other method
451+
if (func_get_args() === []) {
452+
$all = true;
453+
}
454+
450455
if ($symfony || $all) {
451456
$this->sets[] = SymfonySetList::ANNOTATIONS_TO_ATTRIBUTES;
452457
}

0 commit comments

Comments
 (0)