thephpleague/fractal
Output complex, flexible, AJAX/RESTful data structures. observed · 2026-08-28
Health v2 · maintenance only
56/100
- Activity 57
- Release rhythm 29
- Longevity 100
How is this computed?
round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10) — computed 2026-09-03. Adoption (stars, forks) is never an input.
- gap_med: 304
- age_days: 4663
- days_rel: 260
- days_push: 260
- n_releases_24m: 2
Adoption not part of the score
3544 stars · 345 forks observed · 2026-08-28
What it is AI-extracted, prompt v1, taxonomy v1, 2026-08-29, confidence not recorded
A PHP library providing a presentation and transformation layer for complex data output in RESTful APIs, acting as a view layer for JSON. It separates source data from API output via transformers and serializers, supporting standards like JSON-API and HAL.
Use cases
- transform database models into consistent JSON API responses
- serialize API output following JSON-API or HAL standards
- embed nested relationships in REST API responses
- paginate API data results
- shield API consumers from internal schema changes
- type-cast API response data systematically
When to choose
- building a public REST API in PHP with complex data structures
- you need consistent, versioned API output instead of raw json_encode
- you want standards-compliant JSON-API or HAL serialization
- you need relationship embedding and pagination in API responses
When to avoid
- building trivial internal APIs where json_encode suffices
- using a framework whose serializer already covers your needs
- working outside PHP
Facets
library · maturity maintenance
serialization api-framework middleware apis web-development backend php rest-api json-api hal data-transformation transformers pagination php-league
1 source
- readme: https://github.com/thephpleague/fractal · fetched 2026-08-28 · 67f9eebbeeda
Member repositories
| Repository | Role | Health v2 |
|---|---|---|
| thephpleague/fractal | main | 56 |
For agents
markdown · JSON · MCP: product_card(name="thephpleague/fractal")
Data as of 2026-08-30T08:39:29.467469+00:00 · Report a problem