Open aszenz opened 2 years ago
this extension spawn a child process to execute php code, it's inefficient and slow. if do more complex work, it will be more slower. and php-cs-fixer can't only format changed code, grammar will be wrong. if you means only replace the changed lines, i think it's not necessary, replace the whole file cost less time
This feature is useful not for performance but rather to reduce the diff in pr's, u contribute new code, and u wish to format it only and not the whole file. Also helps in code review
this is a extension for vscode, just a wrapper for php-cs-fixer. if you want to use in git, i think you should use php-cs-fixer directly, it provide the diff info in the result.
php-cs-fixer fix --diff --dry-run
VScode has this formatting feature, where it only formats changed lines of code instead of the whole file. Can we add support for this