diff --git a/composer.json b/composer.json index e758feb..145e949 100644 --- a/composer.json +++ b/composer.json @@ -14,7 +14,7 @@ }, "require": { "php": ">=7.4", - "friendsofphp/php-cs-fixer": "v3.89.1", + "friendsofphp/php-cs-fixer": "v3.95.1", "composer-runtime-api": ">=2.0" }, "require-dev": { diff --git a/src/lib/PhpCsFixer/InternalConfigFactory.php b/src/lib/PhpCsFixer/InternalConfigFactory.php index b2919b4..15e829d 100644 --- a/src/lib/PhpCsFixer/InternalConfigFactory.php +++ b/src/lib/PhpCsFixer/InternalConfigFactory.php @@ -89,8 +89,12 @@ public function buildConfig(): ConfigInterface $this->customRules, )); - if ($this->runInParallel && $config instanceof ParallelAwareConfigInterface) { - $config->setParallelConfig(ParallelConfigFactory::detect()); + if ($config instanceof ParallelAwareConfigInterface) { + $config->setParallelConfig( + $this->runInParallel + ? ParallelConfigFactory::detect() + : ParallelConfigFactory::sequential() + ); } return $config; diff --git a/tests/lib/PhpCsFixer/Rule/MultilineParametersFixerTest.php b/tests/lib/PhpCsFixer/Rule/MultilineParametersFixerTest.php index 61f536c..6d6a1a8 100644 --- a/tests/lib/PhpCsFixer/Rule/MultilineParametersFixerTest.php +++ b/tests/lib/PhpCsFixer/Rule/MultilineParametersFixerTest.php @@ -41,76 +41,100 @@ public function testFix( public static function provideFixCases(): iterable { yield 'single parameter should not be modified' => [ - ' [ - ' [ - ' [ - ' [ - ' [ - ' [ 'import_symbols' => true, ], + 'attribute_block_no_spaces' => true, ];