Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Laravel Code Style Laravel Package

jubeki/laravel-code-style

Opinionated code style configuration for Laravel projects. jubeki/laravel-code-style provides a ready-to-use Pint preset to enforce consistent formatting and coding conventions across your app, helping teams keep clean, predictable PHP code with minimal setup.

Deep Wiki
Context7

Technical Evaluation

Architecture fit. jubeki/laravel-code-style is a developer-tooling Composer package, not a runtime dependency. It layers custom PHP-CS-Fixer fixers on top of Laravel Pint's ruleset, so it slots into the existing Laravel code-style pipeline without altering application architecture. It is additive: Pint remains the engine and preset, the package contributes the fixers and wiring that Pint does not ship natively. This is the safest possible category of dependency — dev-only, invoked from Composer scripts or vendor/bin, with no production surface area, no service provider at runtime, and no data migration. It is appropriate for teams that have already standardized on Pint and have a specific, identified gap that Pint's opinionated preset does not cover.

Integration feasibility. Low-complexity. Integration is a composer require --dev, a config file in the repo root, and a command invocation. The real feasibility question is not mechanical but scoping: does the team actually need custom fixers, or does Pint's stock preset already suffice? If the latter, this package adds config surface and maintenance coupling for no gain. The package is also plausibly useful for package authors who want the Laravel ruleset applied inside their own src/ without depending on the full application scaffold.

Technical risk. Contained but non-zero, concentrated in version coupling rather than runtime behavior.

  • Ecosystem version coupling. Both Pint and PHP-CS-Fixer move frequently and sometimes break fixer APIs or change default behavior. A thin wrapper such as this must track both. A Pint minor bump can silently change formatting output, and a PHP-CS-Fixer major bump can break custom fixer signatures.
  • Rule interaction. Custom fixers can conflict with Pint's preset in ways that produce flip-flopping formatting or nondeterministic output — the classic symptom is a diff that reappears after every run.
  • Supply chain and provenance. The repository location is unknown in the provided metadata, and the project sits at 55 stars. That is a maintainer-bus-factor and provenance concern, not a functional one, but it should gate adoption in regulated or security-sensitive environments.
  • Release date. The stated last release (2026-03-12) is ahead of the current date; confirm it reflects an actual tagged release rather than a metadata artifact before pinning.
  • Blast radius on failure. Because the package is dev-only, a broken version degrades CI and local developer experience, not production. That materially lowers the risk ceiling.

Key questions. TPM due diligence before adoption:

  1. Which specific formatting rules do we need that Pint's laravel preset does not already enforce, and what is the cost of those rules being applied inconsistently?
  2. Which Pint and PHP-CS-Fixer versions does the package support, and what is its declared compatibility range in composer.json?
  3. Who maintains the package, is the repository public and verifiable, and is there a release cadence or security disclosure path?
  4. Does it support the PHP versions in our support matrix (including any 8.4+ targets)?
  5. What does the failure mode look like when a custom fixer is incompatible — hard error, silent skip, or partial formatting?
  6. Can we pin the package and the transitive PHP-CS-Fixer version with a lockfile and a version constraint tight enough to make upgrades intentional?
  7. Do we need this across one repo or a portfolio, and does that change the maintenance calculus?

Integration Approach

Stack fit. Strong for Laravel applications and first-party Laravel packages on PHP 8.x with Composer. It assumes Pint is already part of the toolchain; teams on PHP_CodeSniffer or PHP-CS-Fixer directly, without Pint, get no benefit and should not adopt it. It is a poor fit for non-Laravel PHP projects, for teams that deliberately want a non-opinionated or PSR-12-only ruleset, and for environments that disallow dev dependencies on low-provenance packages.

Migration path. Treat this as an additive, reversible layer, never as a replacement for Pint.

  • Phase 0 — baseline. Confirm the repo is already Pint-clean (--test passes on the pinned Pint version). If it is not, run Pint and land that as a standalone commit so the package's effect can be isolated later.
  • Phase 1 — pilot. Add the package as a require-dev with an exact or caret-pinned constraint; commit the lockfile. Add its config alongside the existing pint.json rather than modifying the Pint preset.
  • Phase 2 — dry run. Execute in test/diff mode on a branch and inspect the resulting diff. Any fixer that changes files must be reviewed as a deliberate, single-purpose commit.
  • Phase 3 — CI enforcement. Wire the check into the same CI job that runs Pint, or immediately after it, with a single ordering so results are deterministic.
  • Phase 4 — portfolio rollout. If adopted, replicate the config via a shared preset in a monorepo or across repositories; keep versions in lockstep so local and CI agree.
  • Rollback. Removing the dev dependency and its config returns the repo to stock Pint behavior. Low-risk exit, which is the main argument for a pilot-first approach.

Compatibility. Constrain Pint, PHP-CS-Fixer, and this package together and upgrade them as a unit, not independently. Confirm support for every PHP version in the matrix before rollout, and verify that custom fixers are exercised in CI on each supported PHP version rather than only the newest. Watch for the package lagging behind the current Pint release — if it does, pin Pint lower until the wrapper catches up.

Sequencing. (1) Confirm the rules gap and get stakeholder agreement that consistency matters. (2) Pilot in one high-traffic repo with a small, well-defined set of custom fixers. (3) Validate determinism by running twice and confirming the second run is a no-op. (4) Enforce in CI and add a pre-commit hook if the team uses them. (5) Baseline remediation of existing violations as a separate, isolated commit. (6) Expand to additional repos only after a full Pint upgrade cycle has passed without friction.

Operational Impact

Maintenance. The ongoing cost is version-tracking, not bug-fixing. Every Pint or PHP-CS-Fixer release is a potential compatibility event; budget a small recurring review at each upgrade. Custom fixers written in-house carry their own maintenance burden — that cost exists regardless of this package and should not be attributed to it. The dependency itself is small and stable in scope, so the marginal maintenance load is low as long as the pinned versions do not drift.

Support. The primary support risk is bus factor. A 55-star community package with an unverified repository is maintained on best-effort terms: no SLA, no guaranteed compatibility window, and a plausible path to abandonment. Mitigations are straightforward and should be non-optional: pin versions and lockfiles, vendor or mirror the package internally if policy requires it, and keep a documented fallback (drop the dependency, inline the handful of fixers as project-local PHP-CS-Fixer configuration). The MIT license makes forking viable, which is a meaningful contingency. Do not adopt this in a context that requires vendor support contracts.

Scaling. Scales well across repositories because it inherits Pint's execution model — per-file, parallelizable, cacheable. The constraint is CI wall-clock time, not dependency complexity; add it to an existing Pint step rather than a separate job, and use fixer caching if available. Cost grows with code volume and number of custom fixers, both linear and modest. Organizational scaling (many repos, many teams) is a config-distribution problem, best solved by a shared preset rather than per-repo drift.

Failure modes. Enumerate and pre-assign responses:

  • Silent no-op. Config not discovered or the command pointed at the wrong path — formatting appears to pass while doing nothing. Detect by deliberately introducing a violation in a test branch and confirming CI fails.
  • Version incompatibility. Pint or PHP-CS-Fixer upgrade breaks a custom fixer — hard error in CI. Mitigation: lockstep upgrades in a single PR, never independent dependency bumps.
  • Rule conflict / non-determinism. Two fixers fight, producing churn. Detect with the double-run no-op test; resolve by dropping or reordering one rule.
  • Local/CI divergence. Developer runs a different package or Pint version than CI. Mitigation: same lockfile, same Composer install, no global tooling.
  • Upstream abandonment. Package stops tracking Pint. Mitigation: documented inline fallback; the exit cost is one PR.
  • Provenance failure. Repository unavailable or compromised upstream. Mitigation: internal mirroring and dependency review before adoption.

Ramp-up. Low for anyone already using Pint — the mental model is unchanged, and the new surface is one config file plus one command invocation, so a working engineer is productive in under an hour. Authoring new custom fixers is a different skill tier and requires PHP-CS-Fixer familiarity; plan for one or two engineers to own that rather than distributing it across the team. Documentation burden is a short README section on why each custom rule exists — worth writing, because otherwise the next maintainer removes rules they cannot justify, and formatting drifts back to Pint defaults. Budget one senior engineer for a day to pilot and write the internal guidance, then treat it as background maintenance thereafter.

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
se7enxweb/flysystem
lampwick/laravel
jeslage/statamic-emojis
micahdshackelford/rmap-laravel
draftsmaninc/draftsman
square-bit/laravel-volition
himito/laravel-mailman
htinlynn/genius-helper
maco-studios/hephaestus
elmogy/larafast
xeviant/laravel-paystack
gorilladash/laravel-website-sdk
martialbe/flysystem-oss
chondal/3312client
jeroen-g/flickr
opscale-co/nova-genbi
itsjustvita/laravel-retention
tequilarapido/trackit
gregsphotography/site-builder-filament
cabaoctavio/laravel-query-log