Skip to content

[3.0] Restore the blank line the section banners want around them - #9512

Merged
jdarwood007 merged 1 commit into
SimpleMachines:release-3.0from
albertlast:fix/section-comment-spacing
Aug 13, 2026
Merged

[3.0] Restore the blank line the section banners want around them#9512
jdarwood007 merged 1 commit into
SimpleMachines:release-3.0from
albertlast:fix/section-comment-spacing

Conversation

@albertlast

Copy link
Copy Markdown
Collaborator

Note

This change was produced by an LLM. The change, the commit message and this
description were all written by Claude (Anthropic), driven by @albertlast.

Description

Three files in release-3.0 do not match what the custom SMF/section_comments
fixer produces. Sources/Alert.php is missing the blank line before a banner;
Sources/Autolinker.php and Sources/Actions/Help.php each carry an extra one.
Three lines in total, and composer lint-fix writes all of it.

The interesting part is why nobody noticed.

.github/workflows/php-cs-fixer.yml asks tj-actions/changed-files what the pull
request touched and then, on line 24:

if ! echo "${CHANGED_FILES}" | grep -qE "^(\.php-cs-fixer(\.dist)?\.php|composer\.lock)$"; then
    EXTRA_ARGS=$(printf -- '--path-mode=intersection\n--\n%s' "${CHANGED_FILES}")
fi

So unless the pull request changes the fixer's own config or composer.lock, the
check only ever looks at the files that pull request touched. That is the right
call for speed, and it means a file can drift out of compliance and stay there
indefinitely: nothing re-checks it until somebody edits it again, or until a branch
comes along that does change one of those two files and turns the check back into a
whole-tree scan.

That is how these turned up. #9511 changes composer.lock, so its check ran over
all 1738 files and reported these three, none of which that branch goes anywhere
near.

How this was verified

  • vendor/bin/php-cs-fixer check --allow-risky=yes over the whole tree:
    Found 0 of 1684 files that can be fixed, against 3 before this change.
  • The three files are otherwise untouched — the entire diff is one blank line added
    and two removed.
  • check-signed-off.php passes locally.

Relationship to other PRs

Independent, and worth merging on its own. #9511 and #9326 both change
composer.lock and so both get the whole-tree scan; they stay red on these three
files until this lands.

Issues References (Fixes|Related|Closes)

  1. Related: [3.0][Testing] Cover last week's fixes that the unit suite can reach #9511, [3.0][Testing] Add a PHPUnit suite for the parts that need no database #9326

Three files are out of step with the SMF/section_comments fixer: Alert.php is
missing the blank line before a banner, and Autolinker.php and Help.php each
carry an extra one.

Nothing has been checking. The workflow asks tj-actions/changed-files what the
pull request touched and, unless that list contains .php-cs-fixer.dist.php or
composer.lock, passes it to the fixer as --path-mode=intersection. A pull
request that touches neither of those and does not touch these three files
never looks at them, and that has been every pull request for some time.

Found by a branch that does change composer.lock, which is what turns the
check back into a whole-tree scan.

Signed-off-by: Mathias Alberts <mathiaspapealbert@hotmail.com>
Signed-off-by: albertlast <mathiaspapealbert@hotmail.com>
@jdarwood007 jdarwood007 added this to the 3.0 Alpha 5 milestone Aug 13, 2026
@jdarwood007 jdarwood007 added the Housekeeping SMF code reorganization label Aug 13, 2026
@jdarwood007
jdarwood007 merged commit ceb63ab into SimpleMachines:release-3.0 Aug 13, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Housekeeping SMF code reorganization

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants