style(lint): apply phpcbf auto-fixes and ignore line-length warnings#150
Closed
ginkelsoft-development wants to merge 1 commit into
Closed
style(lint): apply phpcbf auto-fixes and ignore line-length warnings#150ginkelsoft-development wants to merge 1 commit into
ginkelsoft-development wants to merge 1 commit into
Conversation
Two related cleanups so PRs stop failing on pre-existing lint noise: 1. Run phpcbf — applies the 6 auto-fixable PSR-12 violations that already existed on develop (mostly 'blank line at end of control structure' and a misplaced closing parenthesis). Pure formatting, no behaviour change. 2. Exclude Generic.Files.LineLength from the lint command. PSR-12's 120-char rule is a soft limit and a number of existing lines run long. Letting it block CI was producing noise rather than signal. After this: - composer lint exits 0 on develop - All open PRs that were red only on lint will turn green on next push Refs CI hardening (#117 follow-up).
This was referenced May 12, 2026
Owner
Author
|
Vervangen door #157 (consolidated lint fix). Die PR fixt zowel de pre-existing phpcbf errors als de warning-as-failure issue in de CI workflow. |
ginkelsoft-development
added a commit
that referenced
this pull request
May 12, 2026
Two layered fixes so the Code Quality workflow stops failing on every PR: 1. .github/workflows/lint.yml — pass --warning-severity=0 to phpcs. PSR-12's 120-character line limit is documented as a soft cap and several existing lines run long; treating them as warnings rather than failures keeps the cosmetic feedback visible locally without blocking CI. 2. Six pre-existing PSR-12 errors (blank-line-at-end-of-control, mis- placed parenthesis) auto-fixed by phpcbf. These were the errors that, combined with the warning treatment, made phpcs exit 1 even on a clean run. 3. phpcs.xml.dist — same ruleset definition for local use, so devs running 'vendor/bin/phpcs' (without --standard) get the same behaviour as CI. Includes a comment explaining the line-length exclude. This supersedes #150 (which only fixed the phpcbf side but didn't solve the warning-on-exit issue). Closing #150 in favour of this PR. Verified: - vendor/bin/phpcs --standard=PSR12 --warning-severity=0 src/ exits 0 - composer test still green
ginkelsoft-development
added a commit
that referenced
this pull request
May 12, 2026
Two layered fixes so the Code Quality workflow stops failing on every PR: 1. .github/workflows/lint.yml — pass --warning-severity=0 to phpcs. PSR-12's 120-character line limit is documented as a soft cap and several existing lines run long; treating them as warnings rather than failures keeps the cosmetic feedback visible locally without blocking CI. 2. Six pre-existing PSR-12 errors (blank-line-at-end-of-control, mis- placed parenthesis) auto-fixed by phpcbf. These were the errors that, combined with the warning treatment, made phpcs exit 1 even on a clean run. 3. phpcs.xml.dist — same ruleset definition for local use, so devs running 'vendor/bin/phpcs' (without --standard) get the same behaviour as CI. Includes a comment explaining the line-length exclude. This supersedes #150 (which only fixed the phpcbf side but didn't solve the warning-on-exit issue). Closing #150 in favour of this PR. Verified: - vendor/bin/phpcs --standard=PSR12 --warning-severity=0 src/ exits 0 - composer test still green
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.
Probleem
composer lintfaalde opdevelopmet pre-existing PSR-12 issues. Hierdoor was elke nieuwe PR rood op CI, ook PRs die zelf geen lint-issues introduceren.Wijzigingen
1.
composer lint:fixtoegepastZes auto-fixable PSR-12 violations zijn opgelost door
phpcbf. Pure formatting — geen gedragsverandering.Bestanden:
src/Commands/InstallBuildoraCommand.phpsrc/Commands/UpgradeBuildoraCommand.phpsrc/Datatable/DataFetcher.phpsrc/Http/Controllers/InlineRelationController.phpsrc/Http/Controllers/InstallController.phpsrc/Resources/Defaults/UserBuildora.phpType fixes: 'blank line at end of control structure', misplaced closing parenthesis. Allemaal
[x]markers in de phpcs output.2.
Generic.Files.LineLengthuitgeslotenPSR-12's 120-char limit is een soft limit. Diverse bestaande regels in deze codebase zijn langer (148, 151, 203 chars). Het zijn waarschuwingen — geen errors — maar phpcs returned exit code 1 ook bij warnings.
In plaats van honderden regels te knippen, sluiten we deze sniff uit:
```json
"lint": "vendor/bin/phpcs --standard=PSR12 --exclude=Generic.Files.LineLength src/",
"lint:fix": "vendor/bin/phpcbf --standard=PSR12 --exclude=Generic.Files.LineLength src/",
```
Verificatie
composer lint→ exit 0composer test→ tests groensrc/Effect op andere PRs
Na merge zullen de CI runs op #144, #146, #147, #148 en #149 ook groen worden op de lint check (op next push).