Skip to content

Commit b5695b4

Browse files
committed
add docs for symfony/doc
1 parent 2015522 commit b5695b4

File tree

2 files changed

+18
-19
lines changed

2 files changed

+18
-19
lines changed

README.md

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -25,22 +25,3 @@ B) The generated code itself may change between minor releases. This
2525
[2]: https://symfony.com/doc/current/setup/flex.html
2626
[3]: https://symfony.com/doc/current/bundles/SymfonyMakerBundle/index.html
2727
[4]: https://symfony.com/doc/current/contributing/code/bc.html
28-
29-
## Linting Generated Templates
30-
31-
### PHP-CS-FIXER
32-
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.
37-
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.
40-
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:
44-
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

src/Resources/doc/index.rst

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,24 @@ optional arguments and options. Check them out with the ``--help`` option:
4343
4444
$ php bin/console make:controller --help
4545
46+
47+
Linting Generated Code
48+
______________________
49+
50+
MakerBundle uses php-cs-fixer to enforce coding standards when generating ``.php``
51+
files. If you have ``friendsofphp/php-cs-fixer`` added to your project, we'll
52+
use the ``bin/php-cs-fixer`` binary and ``.php-cs-fixer.dist.php`` configuration
53+
file automatically.
54+
55+
Otherwise, we use a ``php-cs-fixer`` version that is packaged with this bundle.
56+
57+
You can explicitly set a custom path to a php-cs-fixer binary and/or configuration
58+
file by their respective environment variables:
59+
60+
- ``MAKER_PHP_CS_FIXER_BINARY_PATH`` e.g. /path/to/project/php-cs-fixer.php
61+
- ``MAKER_PHP_CS_FIXER_CONFIG_PATH`` e.g. /path/to/project/php-cs-fixer.config.php
62+
63+
4664
Configuration
4765
-------------
4866

0 commit comments

Comments
 (0)