The PHP version you are using:
7.1.8
PHP CS Fixer version you are using:
2.7.1
The command you use to run the fixer (and the configuration file you are using if any).
vendor/bin/php-cs-fixer fix xxxx.php
// .php_cs
return PhpCsFixer\Config::create()
->setFinder($finder)
->setRules([
'binary_operator_spaces' => [
'operators' => [
'=>' => 'align_single_space_minimal',
],
],
]);
A minimal sample of valid PHP code that is not fixed correctly (if applicable).
The fixed version of that code after you run the fixer and the version you expected.
The fixer is incorrectly adding a space inside the third array key.
$ diff before.php after.php
4,7c4,7
< 'ait臈\b' => 'as',
< 'yt臈\b' => 'is',
< 'i奴t臈\b' => 'ius',
< 'ut臈\b' => 'us',
---
> 'ait臈\b' => 'as',
> 'yt臈\b' => 'is',
> 'i奴t臈\b ' => 'ius',
> 'ut臈\b' => 'us',
A similar bug was fixed in #3117 which is part of recent 2.7.2 release. Could you try this version to see if it fixes the problem?
I can confirm that 2.8.0 fixes the problem.
I hadn't seen this release - until a few hours ago, composer update was only giving me 2.7.1
was fixed in 2.7.2 actually
Most helpful comment
I can confirm that 2.8.0 fixes the problem.
I hadn't seen this release - until a few hours ago,
composer updatewas only giving me2.7.1