Skip to content

Commit 7598e22

Browse files
committed
better readme
1 parent be16d93 commit 7598e22

File tree

1 file changed

+12
-9
lines changed

1 file changed

+12
-9
lines changed

README.md

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -28,16 +28,19 @@ B) The generated code itself may change between minor releases. This
2828

2929
## Linting Generated Templates
3030

31-
MakerBundle uses php-cs-fixer to enforce coding standards when generating .php
32-
templates. We check for an existing config file in your project root dir, check
33-
for one in `tools/php-cs-fixer`, then fallback to our config file(INSERT LINK TO
34-
CONFIG FILE).
31+
### PHP-CS-FIXER
3532

33+
MakerBundle uses php-cs-fixer to enforce coding standards when generating `.php`
34+
files. If you have `friendsofphp/php-cs-fixer` added to your project, we'll
35+
use the `bin/php-cs-fixer` binary and `.php-cs-fixer.dist.php` configuration file
36+
automatically.
3637

37-
### Envs:
38+
Otherwise, we use the `src/Bin/php-cs-fixer-v3.13.0.phar` and
39+
`src/Resources/config/php-cs-fixer.config.php` that are included with MakerBundle.
3840

39-
- Setting `MAKER_PHP_CS_FIXER_ENABLED=false|true` (Default: `true`) will enable/
40-
disable php-cs-fixer. But generated php files may be ugly if this is set to `false`
41+
You can explicitly set a custom path to the `php-cs-fixer` binary and/or a
42+
php-cs-fixer config file by explicitly setting their respective environment
43+
variables:
4144

42-
- Setting `MAKER_PHP_CS_FIXER_CONFIG=/some/path/to/php-cs-fixer.conf` will
43-
force php-cs-fixer to use that config.
45+
- `MAKER_PHP_CS_FIXER_BINARY_PATH` e.g. /path/to/project/php-cs-fixer.php
46+
- `MAKER_PHP_CS_FIXER_CONFIG_PATH` e.g. /path/to/project/php-cs-fixer.config.php

0 commit comments

Comments
 (0)