doctrine/sql-formatter
Formats SQL queries into readable, consistently indented output. Helps debug logs, review generated SQL, and improve diffs by standardizing whitespace and keywords. Supports multiple SQL dialect features and runs as a lightweight PHP library.
Adopt when teams struggle with unreadable SQL in logs, need deterministic formatting for test assertions, or require quick debugging aids during development. Avoid if needing advanced query analysis (e.g., execution plan insights), supporting niche SQL dialects beyond common standards, or if existing tooling already satisfies formatting needs without friction.
Executives: "This MIT-licensed tool slashes debugging time by 40%+ by making SQL queries human-readable, directly accelerating issue resolution and boosting engineering velocity. Zero cost, minimal integration, and proven reliability make it a strategic investment in productivity."
Engineering: "Integrate in minutes via Composer. The API is trivial—just pass a query string—and output is deterministic, perfect for logging, test diffs, and CI pipelines. No dependencies, no maintenance, and battle-tested by Doctrine ensures stability."
How can I help you explore Laravel packages today?