check24/apitk-dtomapper-bundle
/v1/users → /v2/users).webonyx/graphql-php instead).Hydrator or Symfony Serializer) over explicit mapper classes."This package lets us ship versioned APIs faster by automating the tedious work of converting database entities to clean, standardized DTOs. For example, when we launch /v2/users, we can define exactly how data maps—without breaking existing clients. It’s like having a ‘translation layer’ for our API that reduces bugs and speeds up development. The trade-off? A small upfront setup cost for a long-term productivity boost, especially as our API grows."
Key Outcomes:
*"This bundle gives us a lightweight, opinionated way to handle DTOs in Laravel/Symfony APIs. Instead of manually serializing entities in controllers, we define mappers (e.g., UserV1Mapper) once and reuse them across versions. It’s particularly useful for:
/v1 vs /v2 requests to the right mapper.Trade-offs:
@Dto\View annotation.Proposal: Pilot this for our next major API endpoint (e.g., /v2/products) and measure dev time saved on DTO management."*
How can I help you explore Laravel packages today?