biig/melodiia
Melodiia is a Symfony toolkit for building JSON:API-compliant REST APIs without magic: Swagger documentation endpoint, CRUD controllers, Symfony Form input, error handling, and standardized API responses. Requires PHP 8.0+.
Release Delta — Melodiia 0.12.2 (reviewed against prior assessment)
pagerfanta/doctrine-orm-adapter 4) — This is the most consequential line for a Laravel TPM. It makes explicit what the prior assessment left implicit: Melodiia's persistence layer is Doctrine, not Eloquent. Supporting ORM 3 (a breaking major for Doctrine) confirms the package is investing in the Doctrine ecosystem, not abstracting away from it. Laravel's default stack has no counterpart to Doctrine ORM, so this widens — rather than narrows — the architectural gap between Melodiia and a standard Laravel application.symfony/* to ^7.x. A Melodiia release that requires Symfony 8 components will not co-resolve with a contemporaneous Laravel app without constraint gymnastics.Architecture Fit
laravel-doctrine/orm or hand-rolled entity manager binding), or (b) forking the persistence layer. Both are multi-quarter commitments, not integration tasks.spatie/laravel-api-resources + darkaonline/l5-swagger without a second ORM.FormRequest divergence is unchanged.Integration Feasibility
darkaonline/l5-swagger; melodiia.yaml → config/melodiia.php translation unchanged.Resource classes still assume the Symfony event system.AbstractCrudController or a bespoke adapter layer.doctrine/migrations vs. Laravel migrations is a real collision).Technical Risk
composer why-not against the target Laravel version before any commitment. symfony/form, symfony/validator, symfony/event-dispatcher, and nelmio/api-doc-bundle versions must all co-resolve with illuminate/*. Symfony 8 catch-up work in 0.12.2 is a leading indicator that future patches may force this.0.12.2, minor bumps may contain breaking changes. Pin exact versions and budget for upgrade work on every patch.EventDispatcher vs. Laravel Events remains the sharpest integration seam.spatie/laravel-api-resources fallback live as a comparable spike rather than a paper alternative.Key Questions for the TPM
spatie/laravel-api-resources + l5-swagger cannot, at the cost of a second ORM and a second validation layer?Stack Fit
| Concern | Laravel Native | Melodiia 0.12.2 Path | Risk |
|---|---|---|---|
| Persistence | Eloquent | Doctrine ORM 3 + pagerfanta/doctrine-orm-adapter 4 |
High (new) — dual ORM, dual migrations |
| CRUD Controllers | make:controller --resource |
Extend AbstractCrudController / adapter trait |
High |
| Validation | FormRequest |
Symfony Form + manual mapping | Medium (dual layers) |
| Swagger Docs | darkaonline/l5-swagger |
Melodiia ApiDoc + config translation |
Low |
| JSON:API | json-api-laravel |
Melodiia Resource + middleware |
Medium |
| Error Handling | App\Exceptions\Handler |
ApiProblem + custom renderer |
Low |
| Pagination | LengthAwarePaginator | Pagerfanta | Medium (API shape divergence) |
| DI / Container | Laravel IoC | Symfony ContainerInterface adapter |
High |
| Framework version | Laravel 11/12 → Symfony ^7.x |
Melodiia tracks Symfony 7→8 | High (new) — resolution conflict |
doctrine/orm ^3 via laravel-doctrine/orm, darkaonline/l5-swagger primary, hybrid validation (Symfony Form for Melodiia resources, FormRequest elsewhere).Migration Path
Phase 0 — Dependency & Doctrine Audit (1 week, gate)
composer why-not.spatie/laravel-api-resources spike in parallel for a like-for-like comparison.Phase 1 — Proof of Concept (2–4 weeks)
Post as a Doctrine entity + Melodiia resource, not an Eloquent model — the prior plan's Eloquent-based PoC would not have surfaced the real blocker.MelodiiaServiceProvider, wire FormFactory, EventDispatcher, EntityManager.Phase 2 — Adapter Layer (3–6 weeks)
MelodiiaAdapter translating Symfony Form → Laravel Validator (one direction only), EventDispatcher → Laravel Events, melodiia.yaml → config/melodiia.php.Phase 3 — Full Integration (4–8 weeks)
Sequencing note: Phases 0–1 are now strictly gated on the Doctrine decision. If Doctrine is rejected, skip to the fallback and close the evaluation.
Maintenance
Support
Scaling
LengthAwarePaginator) that surface differently in API responses as datasets grow.Failure Modes
FormRequest accepting different payloads on similar endpoints. Mitigation: contract tests on the OpenAPI schema.Ramp-up
How can I help you explore Laravel packages today?