mwx / ecs-fixers
metaworx custom php-cs-fixer fixers: control-structure braces, extends/implements wrapping, section comments, ternary formatting
dev-master
2026-08-27 10:09 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
This package is auto-updated.
Last update: 2026-08-27 10:35:20 UTC
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
Pre-publication: via the monorepo's path repository (see the repository root
README). Later: composer require --dev mwx/ecs-fixers (usually indirectly
via mwx/coding-standard).
MIT license.