phug/formatter
A formatting extension for Phug, the PHP Pug template engine. It pretty-prints and normalizes Pug source with configurable options, helping keep templates readable and consistent in Laravel and PHP projects.
Adopt when all of the following hold:
Look elsewhere when:
To executives: A small, free (MIT) open-source component that removes a "nice-to-have" build from the roadmap. It normalizes template code so reviews, automated checks, and historical diffs stop generating noise. Cost is a dependency and a few days of integration, not a project. The risk is low and contained — it is a leaf utility, not infrastructure — and because it is MIT and small, we can vendor it outright if the maintainer ever stops.
To engineering: It slots into the existing Phug AST pipeline, so there is no new rendering model to learn. We get deterministic formatting for CI format-checks and snapshot tests. Be clear-eyed about the trade: near-zero adoption means near-zero upstream support, so we pin the version, wrap it behind our own formatter interface, and accept ownership of a fork if needed. If we are not already on Phug, this is not a reason to get on it.
How can I help you explore Laravel packages today?