doctrine/sql-formatter
A lightweight php class for formatting sql statements. Handles automatic indentation and syntax highlighting. observed · 2026-10-12
Health v2 · maintenance only
69/100
- Activity 79
- Release rhythm 38
- Longevity 100
How is this computed?
round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10) — computed 2026-10-21. Adoption (stars, forks) is never an input.
- gap_med: 105
- age_days: 2403
- days_rel: 254
- days_push: 131
- n_releases_24m: 4
Adoption not part of the score
1863 stars · 29 forks observed · 2026-10-12
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-10-12 · 2dfc06cb3041
Member repositories
| Repository | Role | Health v2 |
|---|---|---|
| doctrine/sql-formatter | main | 69 |
For agents
markdown · JSON · MCP: product_card(name="doctrine/sql-formatter")
Data as of 2026-10-19T08:05:51.212177+00:00 · Report a problem