Skip to content

v3.57.0 7th Gear

Compare
Choose a tag to compare
@keradus keradus released this 15 May 14:45
· 40 commits to master since this release
v3.57.0
0d4fcae

What's Changed

Ability to run Fixer with parallel runner 馃帀 by @Wirone in #7777

If you want to enable analysis on multiple CPUs, please follow usage instructions. For convenience, let's summarise it here too 馃槉.

You can fix files in parallel by using config class that implements PhpCsFixer\Runner\Parallel\ParallelConfig\ParallelAwareConfigInterface, and use setParallelConfig() method. Recommended way is to utilise auto-detecting parallel configuration:

<?php

return (new PhpCsFixer\Config())
    ->setParallelConfig(PhpCsFixer\Runner\Parallel\ParallelConfigFactory::detect())
;

However, in some cases you may want to fine-tune parallelisation with explicit values (e.g. in environments where auto-detection does not work properly and suggests more cores than it should):

<?php

return (new PhpCsFixer\Config())
    ->setParallelConfig(new PhpCsFixer\Runner\Parallel\ParallelConfig(4, 20))
;

Full Changelog: v3.56.2...v3.57.0