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.
Architecture fit: The package is a pure PHP library with zero dependencies, making it ideal for Laravel's ecosystem. It integrates natively with Eloquent's query logging and debugging workflows, as Laravel already surfaces raw SQL during development or custom log handlers. Its lightweight nature avoids bloat in existing application architecture.
Integration feasibility: Extremely high due to its single-method API (format()) and lack of complex configuration. Can be added via Composer and wrapped in Laravel's DB::listen() events or custom log channels with minimal code changes (e.g., a single service provider or middleware).
Technical risk: Low overall, but the "unknown repository" status and future-dated release (2026-02-08) raise red flags about authenticity and maintenance. Potential security vulnerabilities if the package is not officially maintained by Doctrine (despite naming). Must verify PHP 8.x compatibility and Laravel 10+ support.
Key questions:
Stack fit: Perfect alignment with Laravel's logging pipeline. Can be injected into existing database query logging (via `DB::listen
How can I help you explore Laravel packages today?