How PHP formatting resolves
For PHP, MokoFormat uses php-cs-fixer with a phpcbf fallback. It discovers the engine in this order: an explicit configured path → your project's vendor/bin → your system PATH (.phar binaries are run through php).
Project config is auto-detected
- A
.php-cs-fixer.php(or.php-cs-fixer.dist.php) at the project root is picked up automatically. - A
phpcs.xmlruleset is used for the phpcbf path.
Diagnose
Run MokoFormat: Diagnose PHP. It reports which engine was found, its full path, the detected config file and your PHP version — so a "nothing happened on format" is never a mystery. MokoFormat fails loud rather than silently leaving PHP unformatted. Part of the Moko VS Code suite.