Latest Results
fix(formatter): restore alignment for mid-line echo tags
715db54b7 "fix(formatter): converge corpus idempotency on a single pass"
restricts the condition that applies `Document::Align` to echo tags inside
HTML templates to opening tags and tags whose entire line prefix is
whitespace. This is too narrow: echo tags that follow HTML content on an
indented line lose their indentation:
<h5>
Some text <?= CHtml::link(
'link', <- lost: dropped to 4 spaces
Yii::app()->..., <- lost
) ?> <- lost: dropped to 0 spaces
</h5>
The same applies when multiple breaking echo tags appear on one line — the
second echo tag follows `<?= ... ?>` output, not pure whitespace:
<h5>
... <?= CHtml::link('link', ...) ?> more text <?= CHtml::link(
'another link', <- lost
..., <- lost
) ?> end.
</h5>
The restriction prevents re-alignment on the second pass: after formatting,
ternary branches can land at the start of a line with leading whitespace,
followed by another echo tag. Applying alignment to that later tag inflates
indentation on re-format. Those problematic lines contain a PHP close tag
(`?>`) before the offending echo tag with non-trivial PHP content in the
prefix; lines with only closing punctuation (`)`, `]`, `}`, `;`) between the
leading whitespace and `?>` are the tail of a broken call and are safe to
align.dotdash:fix_formatter_restore_indent_alignment_for_mid_line_echo_tags_without_prior_close_tag Latest Branches
0%
dotdash:fix_formatter_restore_indent_alignment_for_mid_line_echo_tags_without_prior_close_tag +1%
dotdash:fix_analyzer_declared_template_defaults_not_applied_at_call_site 0%
© 2026 CodSpeed Technology