diff --git a/rector.php b/rector.php index 3a6c449dc2e..997d7c85b14 100644 --- a/rector.php +++ b/rector.php @@ -21,6 +21,7 @@ rectorPreset: true, phpunitCodeQuality: true ) + ->withAttributesSets() ->withComposerBased(phpunit: true) ->withPhpSets() ->withPaths([ diff --git a/src/Configuration/RectorConfigBuilder.php b/src/Configuration/RectorConfigBuilder.php index 6f81f0549f8..2646bc13f86 100644 --- a/src/Configuration/RectorConfigBuilder.php +++ b/src/Configuration/RectorConfigBuilder.php @@ -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; }