Repository navigation
Make configurable fixers honor their ECS config options - #100
Merged
Merged
Conversation
Wire per-fixer PHP-CS-Fixer options through the turbo/--blink path via the ConfigurableFixer interface: array, operator, spacing, casing, language, class, function, import, whitespace and control-structure fixers now read their options from the dumped ECS config, with full option semantics and unit tests. Zero-value structs keep today's behavior, so standalone parity stays 0/1699 and --blink parity is unchanged. PHPDoc fixers are deferred: honoring their options in a single pass diverges from ECS's iterate-to-fixpoint phpdoc handling, so they keep their tuned behavior.
TomasVotruba
force-pushed
the
blink-configurable-fixers
branch
from
September 30, 2026 05:43
4e6b430 to
b3b3427
Compare
TomasVotruba
enabled auto-merge (squash)
September 30, 2026 05:43
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to the configurability work (stacks on #98). Wires per-fixer PHP-CS-Fixer options through the turbo/
--blinkpath so blink honors the dumped ECS config instead of ignoring it.What lands
42 fixers become configurable via the
ConfigurableFixerinterface (the turbo resolver already dispatches to it): array/list/comma/offset, operators and spacing, casing/language/control-simple, class/function/imports, and whitespace/control-structure fixers. Each reads its options from the dumped ECS config, implements the full option set, and has unit tests. Examples:ArraySyntax/ListSyntax(syntax),ConcatSpace/CastSpaces/DeclareEqualNormalize/SpacesInsideParentheses(space/spacing),NoExtraBlankLines(tokens, incl. throw/use),YodaStyle(equal/identical/less_and_greater),OrderedImports(sort_algorithm/imports_order),VisibilityRequired/SingleClassElementPerStatement(elements),ReturnTypeDeclaration(space_before), and more.Turbo rules are now applied in the same canonical priority order as the standalone path (
rules.CanonicalOrder), matching ECS's execution order.Design (no regression)
Zero-value structs keep today's behavior byte-for-byte;
WithConfigonly overrides when the ECS config supplies an option. Verified:--blinkparity on this repo: 1 (unchanged from baseline)go build,go vet,gofmt -s,go test ./...all passDeferred: PHPDoc fixers
The 9 PHPDoc fixers are intentionally left at their current tuned behavior. Honoring their options in blink's single pass diverges from ECS's iterate-to-fixpoint PHPDoc handling (measured: enabling them regressed
--blinkparity on this repo from 1 to 45, all from the PHPDoc group). They need per-fixer work to reproduce ECS's multi-pass result and will follow separately.