apie/type-converter
Apie type converter converts PHP objects into other objects, ideal for mapping DTOs to domain objects and back. It ships with default converters and lets you easily write your own.
User domain objects to UserDTO for an auth service).toArray()).Adopt if:
ArrayHelper, custom mappers) is fragile or duplicated.Look elsewhere if:
toArray() conversions (use Eloquent’s built-in features).*"This package lets us decouple our domain logic from persistence/API layers, reducing technical debt and making our system more adaptable. For example:
*"Problem: Our current type conversion is either:
Solution: This package provides a composable, framework-agnostic way to convert objects with:
User → UserDTO for API, CLI, and tests).Migration Path:
return $user->toArray() with $converter->convert($user, UserDTO::class)).Risk: Low—MIT license, active (though small) community, and Laravel-compatible."*
How can I help you explore Laravel packages today?