Allow PHP CS Fixer as pipeline step for stdin -> format -> stdout
Author: keradusCreated Nov 9, 2025Updated Aug 21, 2026
Labelsstatus/to verifykind/feature requesteasy pick
Feature request
Step 1
document existing handling of STDIN, example of
./php-cs-fixer fix - < src/WordMatcher.php
Step 2
Introduce new behaviour for handling STDIN:
- introduce new
--formatoption calledraw(or provide better name), that will produce raw, full file to STDOUT - use newly introduced format as default when working with STDIN, if env var
PHP_CS_FIXER_FUTURE_MODE=1is configured (to not cause any BC for current Major) - raise error if
--format=rawis used for non-STDIN mode
Link to Discussion where feature request was formed
https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/discussions/8309
Source: PHP-CS-Fixer/PHP-CS-Fixer