From b1e4a07e756213cacf429141c4c861486abdf1a8 Mon Sep 17 00:00:00 2001 From: alexis-boyer <56953765+alexis-boyer@users.noreply.github.com> Date: Thu, 11 Jul 2024 15:34:33 +0200 Subject: [PATCH 1/3] Fix documentation README.md Fix documentation on describing attibuteSets in the RectorConfig --- README.md | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/README.md b/README.md index f80f2292..5e0d535c 100644 --- a/README.md +++ b/README.md @@ -18,12 +18,9 @@ To add a set to your config, use `Rector\Doctrine\Set\DoctrineSetList` class and ```php use Rector\Config\RectorConfig; -use Rector\Doctrine\Set\DoctrineSetList; return RectorConfig::configure() - ->withSets([ - DoctrineSetList::DOCTRINE_CODE_QUALITY, - ]); + ->withAttributesSets(doctrine: true); ```
From 4420a1d3de94e4093b237887ec576fc3bb08d5a7 Mon Sep 17 00:00:00 2001 From: alexis-boyer <56953765+alexis-boyer@users.noreply.github.com> Date: Thu, 11 Jul 2024 18:31:03 +0200 Subject: [PATCH 2/3] Fix README.md with more option Fix the note documentation with PHP 7.x option and link to official documentation --- README.md | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 5e0d535c..7232e49b 100644 --- a/README.md +++ b/README.md @@ -14,14 +14,27 @@ composer require rector/rector --dev ## Use Sets -To add a set to your config, use `Rector\Doctrine\Set\DoctrineSetList` class and pick one of constants: +To add a set to your config, use `->withPreparedSets` method, and pick one of constants: ```php use Rector\Config\RectorConfig; return RectorConfig::configure() - ->withAttributesSets(doctrine: true); + ->withPreparedSets(doctrineCodeQuality: true); ``` +If you're on PHP 7.x, you can use withSets() instead, for doctrineCodeQuality set, so you can define: + + +```php +use Rector\Config\RectorConfig; +use Rector\Doctrine\Set\DoctrineSetList; + +return RectorConfig::configure() + ->withSets([ + DoctrineSetList::DOCTRINE_CODE_QUALITY, + ]); +``` +See [documentation](https://getrector.com/documentation)
From 69a55c7504657c7e21160f380fceffdf1bf8c7c2 Mon Sep 17 00:00:00 2001 From: alexis-boyer <56953765+alexis-boyer@users.noreply.github.com> Date: Thu, 11 Jul 2024 18:40:32 +0200 Subject: [PATCH 3/3] Fix README.md documentation typos Fix typos made on previous commit --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 7232e49b..b844e632 100644 --- a/README.md +++ b/README.md @@ -22,8 +22,8 @@ use Rector\Config\RectorConfig; return RectorConfig::configure() ->withPreparedSets(doctrineCodeQuality: true); ``` -If you're on PHP 7.x, you can use withSets() instead, for doctrineCodeQuality set, so you can define: +If you're on PHP 7.x, you can use withSets() instead, for `doctrineCodeQuality` set, so you can define: ```php use Rector\Config\RectorConfig;