bolt/codingstyle
A Laravel/PHP coding style package for Bolt projects, providing shared formatting and quality rules to keep codebases consistent, readable, and easy to maintain across teams and packages.
Architecture fit: The package is a PHP_CodeSniffer ruleset (built on m6web/coke and m6web/symfony2-coding-standard) rather than a runtime Laravel library. Its architectural role is a dev-dependency static analysis layer, which fits Laravel projects cleanly: it can be wired into composer.json under require-dev and invoked through a composer lint script or a CI job (GitHub Actions, GitLab CI, or Enlightn/StyleCI style gate). It does not touch the application container, service providers, or runtime boot path, so there is zero production surface area.
Integration feasibility: High. v1.0.5 materially improves installability in a Laravel context:
squizlabs/php_codesniffer out of core requirements is the most important change for a TPM. It lets teams pin their own PHPCS version (critical, since Laravel projects often already carry PHPCS via laravel/pint, squizlabs/php_codesniffer, or phpstan toolchains) instead of inheriting a hard transitive constraint that could conflict with the rest of the dev dependency graph.m6web/symfony2-coding-standard constraint reduces the risk of a Composer solver deadlock when mixed with Symfony-adjacent packages already present in a Laravel app (e.g., symfony/console, symfony/process).m6web/coke to require makes the ruleset self-contained — the package now brings its own configuration runner rather than assuming a global install.Technical risk: Low-to-moderate.
Squiz.Strings.ConcatenationSpacing is a behavioral change to the ruleset — existing codebases that were previously clean may now behave differently (fewer errors, which is safe, but it changes the baseline diff).composer.json, no PHP/Laravel version matrix, no test coverage data. Treat adoptability as unverified until a compatibility spike is run.Key questions:
ConcatenationSpacing?symfony2-coding-standard?phpcs.xml wrapper?Stack fit: Suitable as a CI-only quality gate for Laravel 9/10/11 services. Recommended placement: require-dev, executed in a dedicated lint CI stage, not in the local pre-commit hook initially (to avoid developer friction during ramp-up). Pairs well with Pint only if we deliberately designate Pint for formatting and this ruleset for deeper sniff coverage — otherwise the two will disagree and produce churn.
Migration path: Treat as greenfield, not a migration.
phpcs.xml that extends the package ruleset and documents every exclusion with a reason.--filter / diff-aware runs) or via a baseline file so the team is not blocked on legacy debt.Compatibility: Primary risk is Composer resolution, and v1.0.5 directly mitigates it. Secondary risk is rule-set conflicts with Pint, PHPStan, and any existing phpcs.xml. Verify coexistence before committing.
Sequencing: Spike → internal ruleset wrapper → CI on changed files → repo-wide enforcement → publish to other services. Do not block a feature release on this adoption; it is a background quality initiative.
Maintenance: Low ongoing cost once the wrapper ruleset exists. The wrapper is the real asset — it is what insulates the team from upstream sniff churn. Budget roughly a half-day per upstream minor release to review rule changes and re-baseline. The v1.0.5 pattern of relaxing constraints suggests the maintainer is actively smoothing integration, which is a positive maintenance signal.
Support: Community/OSS support only. No vendor SLA. Escalation path is upstream issues plus our fork. Keep a fork-ready posture: pin to a specific tag (1.0.5) rather than a floating constraint, and record the exact resolved PHPCS version in composer.lock.
Scaling: Scales well — PHPCS is fast and parallelizable (--parallel), and CI cost is linear in changed-file count with diff-aware runs. The scaling concern is organizational, not technical: as more services adopt it, the shared wrapper ruleset becomes a versioned internal artifact and needs an owner. Assign that owner before the second service adopts.
Failure modes:
composer update in an unrelated PR, breaking CI. Mitigation: the constraint relaxations in v1.0.5 reduce this; pinning reduces blast radius.main nightly.CONTRIBUTING.md.Ramp-up: Expect 2–4 developer-days total for the initial spike plus triage, then near-zero per-developer cost since violations surface as CI annotations. Developer education burden is minimal but real: the team needs to know which tool owns which class of style issue, and where to add justified exclusions rather than inline phpcs:ignore comments. Recommend a short written policy (one page) covering the Pint/PHPCS boundary, the exclusion-request process, and the pinning/upgrade cadence before rolling out to a second service.
How can I help you explore Laravel packages today?