rector / rector-doctrine
Rector upgrades rules for Doctrine
Installs: 1 485 383
Dependents: 1
Suggesters: 0
Security: 0
Stars: 57
Watchers: 5
Forks: 56
Open Issues: 5
Type:rector-extension
Requires
- php: >=8.1
Requires (Dev)
- doctrine/orm: ^2.16
- phpstan/extension-installer: ^1.3
- phpstan/phpstan: ^1.10
- phpstan/phpstan-webmozart-assert: ^1.2
- phpunit/phpunit: ^10.3
- rector/phpstan-rules: ^0.6
- rector/rector-generator: ^0.7
- rector/rector-src: dev-main
- symplify/easy-ci: ^11.2
- symplify/easy-coding-standard: ^12.0
- symplify/phpstan-extensions: ^11.2
- symplify/phpstan-rules: ^11.1
- symplify/rule-doc-generator: ^12.0
- symplify/vendor-patches: ^11.2
- tomasvotruba/class-leak: ^0.1
- tomasvotruba/type-coverage: ^0.2
- tomasvotruba/unused-public: ^0.3
- dev-main
- 0.16.0
- 0.15.0
- 0.14.2
- 0.14.1
- 0.14.0
- 0.13.0
- 0.11.43
- 0.11.42
- 0.11.41
- 0.11.40
- 0.11.39
- 0.11.38
- 0.11.37
- 0.11.36
- 0.11.35
- 0.11.34
- 0.11.33
- 0.11.32
- 0.11.31
- 0.11.30
- 0.11.29
- 0.11.28
- 0.11.27
- 0.11.26
- 0.11.25
- 0.11.24
- 0.11.23
- 0.11.22
- 0.11.21
- 0.11.20
- 0.11.19
- 0.11.18
- 0.11.17
- 0.11.16
- 0.11.15
- 0.11.14
- 0.11.13
- 0.11.12
- 0.11.11
- 0.11.10
- 0.11.9
- 0.11.8
- 0.11.7
- 0.11.6
- 0.11.5
- 0.11.4
- 0.11.3
- 0.11.2
- 0.11.1
- 0.11.0
- 0.10.6
- 0.10.5
- 0.10.4
- 0.10.3
- 0.10.2
- 0.10.1
- 0.10.0
- dev-skip-interesction
This package is auto-updated.
Last update: 2024-10-18 08:27:54 UTC
README
See available Doctrine rules
Install
This package is already part of rector/rector package, so it works out of the box.
All you need to do is install the main package, and you're good to go:
composer require rector/rector --dev
Use Sets
To add a set to your config, use ->withPreparedSets
method, and pick one of constants:
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:
use Rector\Config\RectorConfig; use Rector\Doctrine\Set\DoctrineSetList; return RectorConfig::configure() ->withSets([ DoctrineSetList::DOCTRINE_CODE_QUALITY, ]);
See documentation
Learn Rector Faster
Rector is a tool that we develop and share for free, so anyone can save hundreds of hours on refactoring. But not everyone has time to understand Rector and AST complexity. You have 2 ways to speed this process up:
- read a book - The Power of Automated Refactoring
- hire our experienced team to improve your code base
Both ways support us to and improve Rector in sustainable way by learning from practical projects.