jacobjoergensen/laravel-fmt
Laravel FMT is a formatting package for Laravel projects. It applies consistent, configurable code style across PHP and Blade files with a single command, keeping your codebase clean and readable, reducing review noise, and enforcing standards with minimal setup. Fast and lightweight.
<?php. That moves "one binary, one config, one CI step" from aspiration to something you can actually evaluate on a branch this quarter, and gives you a concrete cost comparison against the status quo.--reporter gitlab flag paired with --check writes a GitLab Code Quality report, so unformatted files annotate the merge request diff rather than failing a job with an opaque log dump. This is the strongest single reason to look at the package now rather than at 1.0 — and it is GitLab-only, so it is a non-event for GitHub Actions, Bitbucket or Jenkins shops. Adoption friction, not raw capability, is what usually kills a formatter rollout.--check job in one repo, (2) measure diff noise and review-comment volume across two weeks of real MRs, (3) promote to a blocking gate only once idempotency holds on your codebase, (4) reassess at 1.0. Each step has a measurable exit criterion and a cheap reversal.@ in Blade text shifting layout, method chains indented deeper after a multi-line operand, markdown.proseWrap: always re-wrapping lists and blockquotes. Non-idempotent formatters are disqualifying for write-on-save and commit hooks because they generate churn diffs and re-trigger hooks on every commit. This release is the first credible signal that hook-based adoption is on the table; it must be verified against your own templates before you fund the work.! spacing rule and the <div x=<?= $a ?>> unquoted-attribute fix in this release are exactly the long-tail parse bugs you would be signing up to own forever. Formatting is not a product differentiator. Borrow, contribute upstream, and spend the engineering budget on the roadmap.README.md, docs/ and PR templates removes a recurring "this snippet no longer matches the API" review comment. Because a block that fails to parse is kept exactly as written, pseudo-code, // ... elisions and deliberately broken examples survive untouched — so pointing it at a docs directory needs no blocklist and carries near-zero blast radius.php.notOperatorSpace, markdown.proseWrap) describe the real product, which is a Prettier-style code formatter. For a PM this is a discovery-friction and trust signal: evaluate from the repository and changelog, and expect the top of the funnel to under-represent what the tool does. It also means you should confirm which product you're actually adopting before writing a ticket.Consider it when:
resources/views/components is a good pilot scope..git-blame-ignore-revs).Look elsewhere when:
To executives — a small, reversible bet on engineering throughput. We currently pay a maintenance tax on three overlapping formatting setups (Pint, Prettier plus a Blade plugin, and manual Markdown discipline) and on review comments about snippet drift in docs. A single Laravel-native tool now covers PHP, Blade, Markdown and front-end assets from one config and one CI step, and it can surface violations directly on GitLab merge requests instead of in a failed job log. The proposal is not to adopt it as a dependency. It is one engineer for one sprint to run it read-only against one repo, measure the diff noise and review-comment impact, and return with a go/no-go. Cost is a dev dependency and a non-blocking CI job; downside is contained by pinning an exact version and keeping the reformat in a single revertible commit. The alternative — building this ourselves — is multi-quarter work with a permanent maintenance tail on Blade parser edge cases, for zero product differentiation.
To engineering — the pitch is "one config, one command, and you can bail at any point." Concretely: install pinned to an exact version, publish and commit the namespaced config so every developer and CI run makes identical decisions, and add composer fmt / composer fmt:check scripts. Start with --check on one directory you own — resources/views/components is the best first target because the diff is unambiguous — then run for real and read the git diff before letting it near anything else. In CI, --check --reporter gitlab annotates the MR; confirm the artifact filename on the first run rather than assuming it. The 0.3.0 release is largely a list of fixed idempotency bugs, which is exactly what you want to see in a beta and exactly what you should not take on faith: spend five minutes formatting a representative sample of our templates, running it a second time, and asserting git diff is empty. That single test gates whether hooks and format-on-save are on the table. Known rough edges to plan around: form feeds or vertical tabs between PHP tokens now fail rather than format, unquoted Blade attribute values holding PHP tags are inherently ambiguous (quote them), and comment handling at the end of @php / <?php ?> blocks has changed more than once — diff those files specifically after any upgrade. And if we only wanted PHP formatting, we'd stop here and keep Pint.
The ask: approve the spike (one engineer, one sprint, one repo, report-only CI), with a decision gate at two weeks or at the package's 1.0, whichever comes first.
How can I help you explore Laravel packages today?