Add Symfony lint commands to CI pipeline #14

Closed
opened 2026-06-10 00:07:01 +02:00 by myrmidex · 0 comments
Owner

Add Symfony's built-in linters to the Forgejo CI pipeline to catch correctness issues early:

php bin/console lint:container validates service container wiring (catches type mismatches in injected arguments and dead service configs). The more type-hints in the code, the more it catches.
php bin/console lint:twig templates/ checks Twig template syntax and flags references to nonexistent filters/functions.
php bin/console lint:yaml config/ validates YAML config syntax.

These are correctness checks, not architecture enforcement, cheap, fast, and they catch wiring/syntax errors before runtime. Add them as steps in the CI workflow alongside the existing test/phpstan/php-cs-fixer steps.

Note

lint:container may need the CheckTypeDeclarationsPass behavior, which is what running the command enables. No extra config needed, just run the command. Skip Twig deprecation checks (--show-deprecations) in CI; they make the build unstable across Twig versions.

Add Symfony's built-in linters to the Forgejo CI pipeline to catch correctness issues early: `php bin/console lint:container` validates service container wiring (catches type mismatches in injected arguments and dead service configs). The more type-hints in the code, the more it catches. `php bin/console lint:twig templates/` checks Twig template syntax and flags references to nonexistent filters/functions. `php bin/console lint:yaml config/` validates YAML config syntax. These are correctness checks, not architecture enforcement, cheap, fast, and they catch wiring/syntax errors before runtime. Add them as steps in the CI workflow alongside the existing test/phpstan/php-cs-fixer steps. > [!NOTE] > lint:container may need the CheckTypeDeclarationsPass behavior, which is what running the command enables. No extra config needed, just run the command. Skip Twig deprecation checks (--show-deprecations) in CI; they make the build unstable across Twig versions.
myrmidex added the
enhancement
label 2026-06-10 00:07:01 +02:00
myrmidex added the
ci-cd
label 2026-06-10 00:12:33 +02:00
myrmidex self-assigned this 2026-06-10 18:02:30 +02:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: lvl0/rater#14
No description provided.