doctrine/skeleton-mapper
Doctrine Skeleton Mapper is a lightweight mapping library for Doctrine entities, helping convert entity data into simple skeleton objects or arrays for APIs, read models, and presentation layers while keeping persistence concerns separate.
Architecture fit
doctrine/skeleton-mapper is not a Laravel package. It is a framework-agnostic, code-generation-based object mapper from the Doctrine org (the "Skeleton" prototype family, alongside skeleton-validator), authored in the Ocramius/experimental lineage. It maps arrays to typed objects and back by compiling dedicated mapper classes ahead of runtime, trading build complexity for hydration speed.spatie/laravel-data, cuyz/valinor, Symfony Serializer, API Resources) cover the same ground with active maintenance and no codegen step. Architecture fit is therefore narrow and non-default.Integration feasibility
composer.json constraints, and patch for PHP 8.2+/8.3+ before it will install cleanly on a modern Laravel 10/11 stack.Technical risk
Stack fit
cuyz/valinor (typed hydration, active), spatie/laravel-data (Laravel-native DTOs), or Symfony Serializer where Symfony components are already present.Migration path
ObjectMapper interface in your domain layer. No generated class or package type should appear in application code. This keeps the swap to Valinor or Symfony Serializer to a single binding.Compatibility
internal/skeleton-mapper) to control PHP version constraints, patch deprecations, and pin a known-good commit.bootstrap/cache or a dedicated storage/framework/mappers), never into source control, and must be regenerated deterministically in CI.Sequencing
Maintenance
Support
Scaling
Failure modes
Ramp-up
spatie/laravel-data or Valinor: hours to productivity, extensive documentation, active community answers. The delta is the real cost of this dependency.How can I help you explore Laravel packages today?