Skip to content

[TASK] Indent the PHP examples with two spaces - #876

Merged
linawolf merged 1 commit into
mainfrom
task/indent-php-examples-two-spaces
Sep 13, 2026
Merged

linawolf merged 1 commit into
mainfrom
task/indent-php-examples-two-spaces

Conversation

@linawolf

Copy link
Copy Markdown
Member

The shared .editorconfig asks code examples to indent two spaces, so
that a nested example still fits the 80 characters the prose around it
is wrapped to. php-cs-fixer would undo that at the next make fix:
without Config::setIndent() it normalises every example back to the four
spaces PER-CS prescribes, silently and without a conflict.

The fixer now indents two, and the three PHP files under Documentation/
follow in the same commit. Separately this does not work — the CGL check
runs as a dry run in CI and would fail from the moment the setting lands
until the files match it.

The second fixer config in the repository root goes with it. It is a
copy of the one under Build/, differing only in the path it hands the
finder, and nothing reads it: Build/Scripts/runTests.sh names
Build/.php-cs-fixer.dist.php in both the check and the fix command, and
no Makefile target, workflow or composer script mentions the other. Left
in place it would be the file someone edits when the two disagree.

Whitespace only in the examples, git diff -w is empty there. The
repository was CGL-clean beforehand, so nothing unrelated hides in the
diff.

Belongs with #873, which brings the .editorconfig itself.

Releases: main, 14.3, 13.4
Assisted-by: Claude Opus 5 noreply@anthropic.com
Signed-off-by: Lina Wolf

The shared .editorconfig asks code examples to indent two spaces, so
that a nested example still fits the 80 characters the prose around it
is wrapped to. php-cs-fixer would undo that at the next `make fix`:
without Config::setIndent() it normalises every example back to the four
spaces PER-CS prescribes, silently and without a conflict.

The fixer now indents two, and the three PHP files under Documentation/
follow in the same commit. Separately this does not work — the CGL check
runs as a dry run in CI and would fail from the moment the setting lands
until the files match it.

The second fixer config in the repository root goes with it. It is a
copy of the one under Build/, differing only in the path it hands the
finder, and nothing reads it: Build/Scripts/runTests.sh names
Build/.php-cs-fixer.dist.php in both the check and the fix command, and
no Makefile target, workflow or composer script mentions the other. Left
in place it would be the file someone edits when the two disagree.

Whitespace only in the examples, git diff -w is empty there. The
repository was CGL-clean beforehand, so nothing unrelated hides in the
diff.

Belongs with #873, which brings the .editorconfig itself.

Releases: main, 14.3, 13.4
Assisted-by: Claude Opus 5 <noreply@anthropic.com>
Signed-off-by: Lina Wolf
@linawolf
linawolf merged commit 78ed1a3 into main Sep 13, 2026
8 checks passed
@linawolf
linawolf deleted the task/indent-php-examples-two-spaces branch September 13, 2026 10:03
@typo3-docs-backport-bot

Copy link
Copy Markdown

Successfully created backport PR for 13.4:

@typo3-docs-backport-bot

Copy link
Copy Markdown

Successfully created backport PR for 14.3:

linawolf added a commit that referenced this pull request Sep 13, 2026
The shared .editorconfig asks code examples to indent two spaces, so
that a nested example still fits the 80 characters the prose around it
is wrapped to. php-cs-fixer would undo that at the next `make fix`:
without Config::setIndent() it normalises every example back to the four
spaces PER-CS prescribes, silently and without a conflict.

The fixer now indents two, and the three PHP files under Documentation/
follow in the same commit. Separately this does not work — the CGL check
runs as a dry run in CI and would fail from the moment the setting lands
until the files match it.

The second fixer config in the repository root goes with it. It is a
copy of the one under Build/, differing only in the path it hands the
finder, and nothing reads it: Build/Scripts/runTests.sh names
Build/.php-cs-fixer.dist.php in both the check and the fix command, and
no Makefile target, workflow or composer script mentions the other. Left
in place it would be the file someone edits when the two disagree.

Whitespace only in the examples, git diff -w is empty there. The
repository was CGL-clean beforehand, so nothing unrelated hides in the
diff.

Belongs with #873, which brings the .editorconfig itself.

Releases: main, 14.3, 13.4
Assisted-by: Claude Opus 5 <noreply@anthropic.com>
Signed-off-by: Lina Wolf

Signed-off-by: Lina Wolf
(cherry picked from commit 78ed1a3)

Signed-off-by: Lina Wolf
Co-authored-by: Lina Wolf <48202465+linawolf@users.noreply.github.com>
linawolf added a commit that referenced this pull request Sep 13, 2026
The shared .editorconfig asks code examples to indent two spaces, so
that a nested example still fits the 80 characters the prose around it
is wrapped to. php-cs-fixer would undo that at the next `make fix`:
without Config::setIndent() it normalises every example back to the four
spaces PER-CS prescribes, silently and without a conflict.

The fixer now indents two, and the three PHP files under Documentation/
follow in the same commit. Separately this does not work — the CGL check
runs as a dry run in CI and would fail from the moment the setting lands
until the files match it.

The second fixer config in the repository root goes with it. It is a
copy of the one under Build/, differing only in the path it hands the
finder, and nothing reads it: Build/Scripts/runTests.sh names
Build/.php-cs-fixer.dist.php in both the check and the fix command, and
no Makefile target, workflow or composer script mentions the other. Left
in place it would be the file someone edits when the two disagree.

Whitespace only in the examples, git diff -w is empty there. The
repository was CGL-clean beforehand, so nothing unrelated hides in the
diff.

Belongs with #873, which brings the .editorconfig itself.

Releases: main, 14.3, 13.4
Assisted-by: Claude Opus 5 <noreply@anthropic.com>
Signed-off-by: Lina Wolf

Signed-off-by: Lina Wolf
(cherry picked from commit 78ed1a3)

Signed-off-by: Lina Wolf
Co-authored-by: Lina Wolf <48202465+linawolf@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant