Skip to content

Commit

Permalink
[dx] enable all attributes, if none are selected to streamline config (
Browse files Browse the repository at this point in the history
  • Loading branch information
TomasVotruba authored Nov 19, 2024
1 parent 4425eb5 commit cb76a5f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions rector.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
rectorPreset: true,
phpunitCodeQuality: true
)
->withAttributesSets()
->withComposerBased(phpunit: true)
->withPhpSets()
->withPaths([
Expand Down
5 changes: 5 additions & 0 deletions src/Configuration/RectorConfigBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -447,6 +447,11 @@ public function withAttributesSets(
bool $sensiolabs = false,
bool $all = false
): self {
// if nothing is passed, enable all as convention in other method
if (func_get_args() === []) {
$all = true;
}

if ($symfony || $all) {
$this->sets[] = SymfonySetList::ANNOTATIONS_TO_ATTRIBUTES;
}
Expand Down

0 comments on commit cb76a5f

Please sign in to comment.