Weave Code
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

Sql Formatter Laravel Package

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.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

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:

  • Is this package genuinely part of the Doctrine organization on GitHub?
  • What is the actual maintenance cadence and community activity?
  • How does it handle dialect-specific SQL (e.g., PostgreSQL window functions vs MySQL syntax)?
  • Are there known edge cases where formatting fails or produces incorrect output?

Integration Approach

Stack fit: Perfect alignment with Laravel's logging pipeline. Can be injected into existing database query logging (via `DB::listen

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.
davejamesmiller/laravel-breadcrumbs
artisanry/parsedown
christhompsontldr/phpsdk
enqueue/dsn
bunny/bunny
enqueue/test
enqueue/null
enqueue/amqp-tools
bower-asset/punycode
bower-asset/inputmask
bower-asset/jquery
bower-asset/yii2-pjax
laravel/nova
spatie/laravel-mailcoach
spatie/laravel-superseeder
laravel/liferaft
nst/json-test-suite
danielmiessler/sec-lists
jackalope/jackalope-transport
twbs/bootstrap4