mirror of
https://github.com/rectorphp/rector.git
synced 2025-03-14 20:39:43 +01:00
disable imports by default
This commit is contained in:
parent
82830e0805
commit
fa7f785285
13
README.md
13
README.md
@ -193,21 +193,24 @@ parameters:
|
||||
|
||||
### Import Use Statements
|
||||
|
||||
FQN classes are imported by default every time Rector performs a change, so you don't have to do it manually/after each run. You can disable it by:
|
||||
FQN classes are not imported by default. If you don't to do do it manually after every Rector run, enable it by:
|
||||
|
||||
```yaml
|
||||
# rector.yaml
|
||||
parameters:
|
||||
auto_import_names: false
|
||||
auto_import_names: true
|
||||
```
|
||||
|
||||
You can also fine-tune how these imports are processed using these two options :
|
||||
You can also fine-tune how these imports are processed:
|
||||
|
||||
```yaml
|
||||
# rector.yaml
|
||||
parameters:
|
||||
import_short_classes: false # this will not import root namespace classes, like \DateTime or \Exception
|
||||
import_doc_blocks: false # this will not import classes used in PHP DocBlocks, like in /** @var \Some\Class */
|
||||
# this will not import root namespace classes, like \DateTime or \Exception
|
||||
import_short_classes: false
|
||||
|
||||
# this will not import classes used in PHP DocBlocks, like in /** @var \Some\Class */
|
||||
import_doc_blocks: false
|
||||
```
|
||||
|
||||
### Limit Execution to Changed Files
|
||||
|
@ -13,7 +13,7 @@ parameters:
|
||||
rector_recipe: []
|
||||
|
||||
# importing FQN names
|
||||
auto_import_names: true
|
||||
auto_import_names: false
|
||||
# e.g. import \DateTime
|
||||
import_short_classes: true
|
||||
# e.g. /** @var \Some\ClassHere */
|
||||
|
Loading…
x
Reference in New Issue
Block a user