single_quote and string_implicit_backslashes together requires 2 passes to fully fix some strings
Author: TomVHPrestoCreated Aug 20, 2026Updated Sep 9, 2026
Labelskind/bugstatus/to verify
Problem description
With these rules combined, the output of the fix command outputs something that doesn't pass itself. It needs fixing twice to fully fix. Unfortunately, this then breaks with the caching - the cache says that the file is fully fixed, and until the cache is manually deleted the fix command does nothing.
Minimal reproducer CLI command
./vendor/bin/php-cs-fixer fix --rules=single_quote,string_implicit_backslashes ./a.php
Minimal reproducer code snippet
<?php
$a = "aaa\\bbb\\ccc\\";After 1st pass becomes
<?php
$a = 'aaa\\bbb\\ccc\\';after 2nd pass becomes
<?php
$a = 'aaa\bbb\ccc\\';Fixer version
3.95.19
PHP version
8.4.8
How do you run Fixer?
Composer package
Contribution Checks
- I have verified if this problem was already reported
- I am familiar with "Feature or bug?"
Source: PHP-CS-Fixer/PHP-CS-Fixer