mwx / ecs-fixers
Custom php-cs-fixer fixers for the metaworx code style: control-structure braces, extends/implements wrapping, section comments, ternaries
0.10.5
2026-09-25 11:06 UTC
Requires
- php: ^8.2
- friendsofphp/php-cs-fixer: ^3.0
- mwx/lib: ^0.1
- nikic/php-parser: ^5.0
Requires (Dev)
- phpunit/phpunit: ^11.5
- symfony/finder: ^7.0
- symplify/easy-coding-standard: ^13.0
Suggests
None
Provides
None
Conflicts
None
Replaces
None
README
Custom php-cs-fixer fixers implementing the metaworx code style.
Owns the mwx\CS\ namespace prefix.
Contents
| Component | Purpose |
|---|---|
ControlStructureBraceFixer | Allman-style brace and newline placement for control structures |
ClassExtendsImplementsWrappingFixer | extends/implements clause wrapping |
SectionCommentsFixer | // constants / // properties section comment ordering |
TernaryFixer + mwx\CS\Parser\* | Ternary formatting backed by nikic/php-parser analysis |
src/CS/Fixer/Spec/ | Executable spec fixtures (composer spec:check / spec:build) |
The fixers are plain php-cs-fixer plugins;
ECS is only a dev dependency for the test harness.
The preset configuration wiring them up lives in mwx/coding-standard.
Development
composer install # nested workspace: resolves mwx/lib from ../ via path repo
vendor/bin/phpunit # 600+ tests (PHPUnit 11)
Install
composer require --dev mwx/ecs-fixers
It usually arrives through mwx/coding-standard, which requires it.
MIT license.