Closed keradus closed 7 years ago
It was added in V1 to run the task in parallel and just copied for V2. I did not know it had support for multiple files in V2. Feel free to improve the task at any time.
What kind of solution do we want here? We can pass the value of the project dir to the fix parameter that will scan all files in 1 time. Or we can check the changed files/files to commit and find common directories and scan dirs instead of files. I would be happy to fix this.
I would suggest to either:
fix
command (regardless current or suggested solution, modified file could be excluded in PHP CS Fixer config (eg .php_cs.dist), so it would be nice to respect that running command with path and intersection mode)Runner
of PHP CS Fixer programmatically.Fixed in #395
v2 allows to run single process with multiple files. current implementation runs multiple processes per single file: https://github.com/phpro/grumphp/blob/53816aef86fb497e79fad024d5299f002c9ed1b7/src/Task/AbstractPhpCsFixerTask.php#L120 as you dont run the Runner class but call CLI command, this will run 10 commands instead of one, making it 10 times slower.