rectorphp / rector-doctrine

Rector upgrade rules for Doctrine
https://getrector.com
MIT License
54 stars 56 forks source link

[DOCUMENTATION] The main README.md shows an outdated way of converting attribute #327

Closed alexis-boyer closed 4 days ago

alexis-boyer commented 1 month ago

On the README.md file it shows, in order to convert Doctrine annotation into PHP attribute, a command as follow

use Rector\Config\RectorConfig;
use Rector\Doctrine\Set\DoctrineSetList;

return RectorConfig::configure()
    ->withSets([
        DoctrineSetList::DOCTRINE_CODE_QUALITY,
    ]);

This is however the old way to do and is not supported anymore. The official documentation shows another way (https://getrector.com/documentation/set-lists)

use Rector\Config\RectorConfig;

return RectorConfig::configure()
    ->withAttributesSets(doctrine: true);
TomasVotruba commented 1 month ago

Thanks for reporting! Could you send PR to fix it? :+1:

alexis-boyer commented 1 month ago

I do it as soon as I can.

samsonasik commented 4 days ago

Resolved at https://github.com/rectorphp/rector-doctrine/pull/328