Php-cs-fixer: Missing docs for creating custom fixers

Created on 25 Oct 2017  路  3Comments  路  Source: FriendsOfPHP/PHP-CS-Fixer

In documentation, there are no information about creating custom fixers whatsoever. We had a really tough time figuring out what is wrong with our custom fixers after upgrading from 1.* to 2.*. I have created new pull request for adding information about configuration changes in UPGRADE.md but I believe that basic tutorial for creating custom fixers in documentation could be very useful.

topidocumentation

Most helpful comment

To clarify the situation: There already is doc/COOKBOOK-FIXERS.md file that explains how to develop a new fixer but it focuses on creating internal fixers.

The documentation currently lacks two points:

  • How to register and enable a custom fixer
  • The convention for return value of getName() method of custom fixers - see FixerNameValidator which says that custom fixer name must be in format: FirstPart/second_part but comment in FixerInterface says just that the name should be all lowercase.

All 3 comments

To clarify the situation: There already is doc/COOKBOOK-FIXERS.md file that explains how to develop a new fixer but it focuses on creating internal fixers.

The documentation currently lacks two points:

  • How to register and enable a custom fixer
  • The convention for return value of getName() method of custom fixers - see FixerNameValidator which says that custom fixer name must be in format: FirstPart/second_part but comment in FixerInterface says just that the name should be all lowercase.

Hi ;)

Looks like some valid points,
could you please send a PR ?

Hi, I believe so, but it will probably take a while :)

Was this page helpful?
0 / 5 - 0 ratings