doctrine/sql-formatter
A lightweight php class for formatting sql statements. Handles automatic indentation and syntax highlighting. observed · 2026-08-28
Health v2 · maintenance only
75/100
- Activity 87
- Release rhythm 45
- Longevity 100
How is this computed?
round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10) — computed 2026-09-02. Adoption (stars, forks) is never an input.
- gap_med: 99.5
- age_days: 2355
- days_rel: 206
- days_push: 83
- n_releases_24m: 5
Adoption not part of the score
1865 stars · 29 forks observed · 2026-08-28
What it is AI-extracted, prompt v1, taxonomy v1, 2026-08-30, confidence not recorded
A lightweight PHP library for formatting SQL statements with automatic indentation, line breaks, and syntax highlighting. It is a maintained fork of jdorn/sql-formatter under the Doctrine organization.
Use cases
- format sql queries for debugging
- pretty print sql statements
- add syntax highlighting to sql output
- compress sql queries by removing comments and whitespace
- format sql for error logs
When to choose
- you need to pretty-print or highlight SQL in a PHP application
- you want a small dependency-free formatter for debugging auto-generated queries
- you need SQL output suitable for logs or the command line
When to avoid
- you need to parse or analyze SQL semantically rather than format it
- you need SQL linting or validation
- you work outside PHP
Facets
library · maturity stable
formatter parser databases developer-tools web-development php cli sql syntax-highlighting pretty-printing debugging
1 source
- readme: https://github.com/doctrine/sql-formatter · fetched 2026-08-28 · 2dfc06cb3041
Member repositories
| Repository | Role | Health v2 |
|---|---|---|
| doctrine/sql-formatter | main | 75 |
For agents
markdown · JSON · MCP: product_card(name="doctrine/sql-formatter")
Data as of 2026-08-30T08:39:29.467469+00:00 · Report a problem