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

Code Style Pint Laravel Package

artisanpack-ui/code-style-pint

Laravel Pint preset that enforces ArtisanPack UI coding standards, matching the artisanpack-ui/code-style PHPCS rules. Publish a ready-made pint.json via artisan command, generate configs for packages with PintConfigBuilder, or opt into WordPress-style spacing with PHP-CS-Fixer.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture fit. This is a configuration-distribution package, not a runtime library. It ships a pint.json stub, a PintConfigBuilder fluent API, an ArtisanPackUIPreset rule-set class, an artisan publish command (artisanpack:publish-pint-config), and an optional PHP-CS-Fixer stub for WordPress-style spacing. Architecturally it sits entirely in the dev-dependency layer and touches no production code paths — the blast radius of adopting it is limited to developer tooling and CI. That is a favorable risk profile for a TPM: it can be trialed, measured, and reverted without a release train. The one architectural wrinkle is that the package straddles two formatters (Pint/PHP-CS-Fixer) and two standards packages (this one plus artisanpack-ui/code-style PHPCS), so "the standard" is actually enforced by a pair of tools with different installation, invocation, and CI semantics. That bifurcation is the main thing a TPM must pin down before committing.

Integration feasibility. Technically straightforward: composer require --dev, run the publish command, run ./vendor/bin/pint. For package repositories (no artisan), the builder script or a direct stub copy works, and the docs supply a pint-setup.php recipe plus composer script aliases. The builder API has clear levers (enable/disable rule groups, add/remove rules, exclude paths) so teams can dial back contentious rules like yoda_style and declare_strict_types without forking. Feasibility is high; the friction is organizational, not technical — the preset is opinionated and will produce a large first-pass diff.

Technical risk. Several concrete concerns:

  • Zero adoption signal. 0 stars, 0 dependents, 0 downstream usage. There is no evidence of the preset surviving contact with a real, messy codebase. The rule set is only as trustworthy as its untested edge cases; expect to be the first person to discover that a rule conflicts with a generated file, a facade docblock, or a legacy trait ordering.
  • License inconsistency. The README states GPL-3.0-or-later in the body but MIT in the package metadata/description. For an internal dev tool this is likely immaterial, but a TPM should get this resolved in writing before it appears in a dependency manifest that legal or a customer scans — GPL in a dev dependency is a conversation, not a blocker, but a surprise conversation is worse.
  • Single-maintainer / vendor-lock signal. "ArtisanPack UI" is an ecosystem with a companion PHPCS package and a Laravel Boost guideline override; the value proposition assumes you buy into that whole standard. Adopting the Pint preset without the PHPCS package yields only partial enforcement (no line length, naming, or security sniffing).
  • Pint version coupling. The preset pins specific fixer names and option shapes. Pint is bundled with Laravel and moves with Laravel majors; a rule renamed or removed upstream silently becomes a no-op or a hard error on pint --test.
  • Future-dated release metadata (2026-06-09) suggests either a data artifact or an unusual release process; either way, verify the actual tag and CHANGELOG against the repository before pinning a constraint.

Key questions.

  1. Do we intend to standardize on the ArtisanPack UI style, or is this being evaluated purely as a drop-in Laravel preset? If the latter, Laravel's built-in laravel preset plus a handful of custom rules may deliver 90% of the value with zero third-party dependency.
  2. Will we adopt the companion artisanpack-ui/code-style PHPCS package at the same time, or run Pint alone? Half the standard is unenforced without it.
  3. What is the authoritative license — MIT or GPL-3.0-or-later? Get this confirmed before it enters composer.json.
  4. Who owns the preset if upstream goes quiet? Is a vendored/forked copy acceptable, and does the team have the PHP-CS-Fixer fluency to maintain it?
  5. Does any team genuinely need WordPress-style spacing? If not, explicitly scope that entire branch out — it doubles the toolchain for a niche formatting preference.

Integration Approach

Stack fit. Native to Laravel: Pint ships with the framework, the package publishes via artisan, and the preset's rules map cleanly onto PHP-CS-Fixer fixers that Laravel developers already encounter. The PHP-CS-Fixer path is only relevant if WordPress-style spacing is a real requirement; otherwise it is dead weight. Fit is good for a Laravel shop with an existing pint.json; poor for a polyglot repo or a non-Laravel PHP codebase, since there is no artisan and you fall back to a bootstrap script.

Migration path. Two viable routes, and the choice should be deliberate:

  • Greenfield or low-debt repos: publish the preset wholesale, run pint once, commit the resulting formatting diff as an isolated, review-free "style only" commit, add a pint --test gate to CI. Fast, clean, done in an afternoon.
  • Mature repos: start from the PintConfigBuilder and enable rule groups incrementally — formatting rules first (mechanical, low controversy), then structure rules (ordered_class_elements, ordered_imports, which generate the biggest diffs), then best practices last (declare_strict_types and yoda_style last, since these change semantics-adjacent code and provoke the most reviewer pushback). Land each group as its own PR. Realistically three to five PRs over two to three sprints for a mid-sized codebase.

Either way, seed the effort with .git-blame-ignore-revs pointing at the formatting commits. This is cheap, and it is the single highest-leverage step for preserving git blame usefulness and defusing "you broke history" objections. Note that declare_strict_types will add declare(strict_types=1); to every file — that is not purely cosmetic and can surface latent TypeErrors at runtime in code paths that previously coerced. Treat that rule as a separate, tested increment, not part of the formatting sweep.

Compatibility. Requires Composer-installed Pint (present in any modern Laravel app). Confirm the Pint major version shipped by the Laravel version in use and verify every fixer named in the preset exists in that version before rollout — a quick pint --test on a single file will expose unknown-rule errors. PHP-CS-Fixer, if used, is a separate install with its own version drift. Editor integration (PhpStorm external tool, VS Code Laravel Pint extension) is conventional and low-risk. The Laravel Boost guideline override is a nice touch for AI-assisted workflows but should be treated as optional; it also means the package will quietly inject prompt guidance into assistants, which some orgs will want to review.

Sequencing.

  1. Spike in one repository: install as dev dependency, publish with --force into a branch, run pint --test to generate a diff-size report. This is the go/no-go gate and costs hours, not days.
  2. Resolve license and pin an explicit version constraint (avoid floating ^1.0 on a 0-dependent package).
  3. Decide PHPCS companion: yes or no. If no, document the enforcement gap.
  4. Ratify the contentious rules (yoda_style, declare_strict_types, assignment alignment via binary_operator_spaces) with the team before the sweep — retroactively removing a rule after 300 files are reformatted is wasted work.
  5. Land the mechanical formatting sweep with .git-blame-ignore-revs.
  6. Separate PR for strict types, tested against the full suite.
  7. Wire CI: pint --test on PRs, plus PHPCS if adopted.
  8. Add composer pint / composer pint:test script aliases and a short contribution note in the repo README.
  9. Roll to remaining repositories with the now-proven config.

Operational Impact

Maintenance. Low ongoing burden in the steady state — a pinned pint.json is inert — but the ownership question is real. With one maintainer and no downstream users, upstream is unlikely to prioritize fixes for a rule that misfires in your codebase; your realistic fallback is to inline the offending rule override locally (which addRule/removeRule/exclude make easy) or fork. Budget for a Pint major-version review once per year alongside Laravel upgrades, plus a re-run of the preset against the upgraded fixer set. The vendored-stub escape hatch (cp stubs/pint.json.stub pint.json) is valuable: it means the package can be dropped entirely and the config survives, which materially de-risks the dependency.

Support. Community-only, MIT/GPL ambiguous, no vendor relationship, no SLA. Internal support burden is low in absolute terms because the failure modes are developer-visible and local (a formatter complains; you read the error). The absence of stars and dependents means you cannot lean on a Stack Overflow corpus for obscure rule interactions; expect to debug PHP-CS-Fixer fixer behavior directly. Assign one named owner per repo — a "style steward" — rather than treating it as nobody's problem.

Scaling. Scales fine across many repositories: the same pinned preset and the same CI job replicate cheaply, and the builder makes programmatic generation across a monorepo or package fleet trivial. The genuinely non-scaling part is human — a large formatting diff against a large, actively-developed repo creates a merge-conflict window where every open branch must rebase. Mitigate by scheduling the sweep at a low-velocity moment, announcing a code freeze window of hours (not days), and having the steward run the reformat and push rather than asking 15 developers to do it individually. The WordPress-spacing path scales worse: it introduces a second formatter, a second CI job, and divergent local workflows, so only take it on if there is a durable business reason.

Failure modes.

  • Silent no-op. A rule renamed or removed in a Pint upgrade is ignored without error; the standard quietly degrades. Detect with pint --test in CI plus a periodic spot-check that the ruleset still parses as expected.
  • Over-broad exclusion. Teams add paths to exclude to unblock a PR and never remove them; enforcement hollows out. Review the exclude list at each upgrade.
  • Divergent formatter state. If some repos use Pint and others PHP-CS-Fixer, or versions differ, PRs churn on whitespace. Pin versions and standardize the invocation.
  • Strict-types fallout. Enabling declare_strict_types late can surface runtime TypeErrors in weakly-tested paths. Treat as a tested increment, never a drive-by.
  • Publish overwrite. --force clobbers local customizations; default to non-forced publishes and diff before committing.
  • Bus factor. If the single steward leaves and the package is unmaintained, the vendored stub is the continuity plan — document that in the runbook.

Ramp-up. Minimal for developers: composer pint and composer pint:test are self-explanatory, and Pint is already familiar Laravel tooling. A half-page in the repo README plus editor integration covers it. The real ramp-up cost sits with the steward: understanding PintConfigBuilder composition, PHP-CS-Fixer fixer semantics, and how to negotiate rule relaxations with the team. That is roughly a day of focused work. For wider org adoption, one 30-minute walkthrough covering the CI gate, the blame-ignore file, and "what to do when Pint disagrees with your PR" is sufficient. Overall: cheap to adopt, cheap to reverse, but the 0-dependent status means you are the pilot — plan the initial spike accordingly and do not treat the preset as validated until it has survived one real codebase.

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.
hsluv/hsluv
seampact/codegen
seampact/hooks
seampact/ir
mehedimi/laravel-amp-mail
happones/laravel-vue-i18n-generator
jwerd/inertia-table
siberfx/flysystem-wasabi
hollyit/token-replace
ippanelcom/laravel-sdk
adachsoft/changelog-linter
adachsoft/collection
payerurl/telegrambot-crypto-payment-instant-payout
dskripchenko/laravel-hybrid-search
riorizkyrainey/lara-ced
mehedimi/static-vel
zharp/zharp
nonsapiens/bigquery-model-sync
lgu-bayambang-ict-office/lgu-laravel-development-standards
andydefer/laravel-support