mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-12-10 03:28:18 +01:00
31 lines
502 B
Markdown
31 lines
502 B
Markdown
### Refactoring code with [rector](https://getrector.com)
|
|
|
|
|
|
#### Installation
|
|
|
|
Run in this folder
|
|
```shell
|
|
cd dev/tools/rector
|
|
```
|
|
|
|
Install rector with composer
|
|
```shell
|
|
composer install
|
|
```
|
|
|
|
|
|
#### Usage
|
|
|
|
##### To make changes (remove --dry-run for real run)
|
|
```shell
|
|
cd dev/tools/rector
|
|
./vendor/bin/rector process --debug --dry-run
|
|
```
|
|
|
|
##### To make changes on a given directory
|
|
|
|
```shell
|
|
cd dev/tools/rector
|
|
./vendor/bin/rector process --debug [--dry-run] [--clear-cache] ../../../htdocs/core/
|
|
```
|