Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Skeleton Mapper Laravel Package

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.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

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.
  • It is a marshalling layer, not a persistence layer. It does not replace Eloquent, Doctrine ORM, or the query builder. Its only legitimate slot in a Laravel codebase is a bounded, performance-sensitive array↔DTO boundary (e.g., high-volume ingestion or export pipelines), sitting behind your own abstraction.
  • For conventional Laravel work — request validation, API resources, model casting, job payloads — the idiomatic tools (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

  • Installable via Composer, but there is no service provider, no facade, no auto-discovery, and no Laravel-facing documentation. Wiring is entirely manual: mapper generation target directory, autoload registration, cache warming in the deploy pipeline, and container bindings you write yourself.
  • The generated-code model conflicts with Laravel's expectations in several places: generated artefacts must exist before the container resolves a mapper, they must be rebuilt on schema change, and they must be present on every node (or built at boot) in multi-instance deployments.
  • The package is archived, so Composer constraints almost certainly predate current PHP and Laravel releases. Expect to fork, relax 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

  • Abandonment is the dominant risk. Archived means no security advisories, no CVE response, no PHP-version compatibility work, and no upstream bug fixes. Any defect becomes internal, permanently.
  • Experimental provenance: the Skeleton family was published as a prototyping vehicle, not a supported product. API stability and documentation depth should be assumed low.
  • Codegen debugging cost: failures surface in generated classes, not in your source. Stack traces cross a boundary your team did not author.
  • Adoption signal is weak: 101 stars and a 0.4675 composite score indicate negligible community validation. There is no meaningful third-party knowledge base to fall back on.
  • Key questions to resolve before any further investment
    1. Which concrete code path is actually bottlenecked, and what is the measured cost of the current mapper (Eloquent casting, Valinor, hand-written hydrators)?
    2. What PHP and Laravel versions must we support for the next 24 months, and does the package install on them unpatched?
    3. Are we willing to own a permanent fork, including security triage, and who is the named owner?
    4. Does the generated-code step fit our CI/CD and immutable-artefact deployment model?
    5. Is there a maintained alternative that meets the same benchmark within an acceptable margin? (Default hypothesis: yes.)
  • Verdict: do not adopt for new work. Retain only as a reference implementation for benchmarking against a maintained serializer.

Integration Approach

Stack fit

  • Poor as a general-purpose component; acceptable only as an isolated, internally-owned utility inside one bounded context.
  • Do not place it on the Eloquent path. Eloquent models, relationships, and lifecycle events are out of scope; attempting to bridge them produces two competing mapping models in one codebase.
  • Preferred modern substitutes to evaluate first: cuyz/valinor (typed hydration, active), spatie/laravel-data (Laravel-native DTOs), or Symfony Serializer where Symfony components are already present.

Migration path

  • Treat as a spike, not a migration. Timebox a proof of concept to one non-critical read path and measure against the incumbent.
  • If — and only if — the benchmark shows a material win, wrap the package behind a first-party 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.
  • Write the exit plan before the entry plan: the abstraction exists specifically because upstream support will never arrive.

Compatibility

  • Fork under an internal namespace (e.g. internal/skeleton-mapper) to control PHP version constraints, patch deprecations, and pin a known-good commit.
  • Generated output must go to a build-artefact directory (bootstrap/cache or a dedicated storage/framework/mappers), never into source control, and must be regenerated deterministically in CI.
  • Confirm OPcache behaviour and preloading compatibility with generated files before committing.

Sequencing

  1. Benchmark the actual hot path against Valinor and the existing implementation. Most "mapping is slow" findings are query or serialization problems, not hydrator problems.
  2. If a gap survives measurement, run a two-week spike on one read-only path, with the interface wrapper written first.
  3. Gate promotion on: benchmark delta, PHP-version install proof, and a named internal maintainer.
  4. If any gate fails — as expected — close the spike and record the decision so it is not re-litigated.

Operational Impact

Maintenance

  • Total ownership transfer. Archival means the maintenance burden is 100% internal from day one: dependency updates, PHP minor-version breakage, deprecation fixes, and any security issue discovered in transitive Doctrine dependencies.
  • Budget realistically: this is not a "free library" — it is a small, permanently-funded internal fork with an ongoing tax disproportionate to 101 stars of community validation.

Support

  • No vendor, no maintainer, no issue tracker, no security contact. Internal escalation path only.
  • Requires at least one engineer who understands code generation, generated-artefact lifecycles, and the Doctrine conventions the package assumes. This is a single-point-of-failure profile unless two people are trained.

Scaling

  • Runtime scaling is the package's one genuine strength: precompiled mappers avoid reflection and perform well under high request volume.
  • Scaling the organisation is the problem. Every new service, every new engineer, and every framework upgrade multiplies the fork's surface area. Deployment scaling requires the artefact-build step to be correct on every node — a class of failure that idiomatic Laravel code simply does not have.

Failure modes

  • PHP/Laravel upgrade lock: the codebase cannot move to a new runtime until the fork is patched, putting it on the critical path of platform upgrades.
  • Stale generated code: schema or DTO changes without a rebuild produce silent mis-mapping — wrong field, dropped field, or type coercion — rather than a loud error. This is the highest-severity failure mode because it corrupts data quietly.
  • Deploy skew: nodes with mismatched generated artefacts in a rolling deploy read inconsistent shapes.
  • Debuggability: production incidents route through generated code your team did not write and cannot easily instrument.
  • Silent abandonment drift: transitive Doctrine dependencies continue to evolve; nothing signals incompatibility until something breaks at runtime.

Ramp-up

  • High. Onboarding requires the codegen mental model, the build pipeline, the fork's patch history, and the internal abstraction contract — before a new hire can safely touch a mapper.
  • Compare to spatie/laravel-data or Valinor: hours to productivity, extensive documentation, active community answers. The delta is the real cost of this dependency.
  • Recommendation to stakeholders: reject for production use. Cite abandonment, version-compatibility lock, and silent-mapping failure risk as the deciding factors, and redirect the performance investigation to a maintained serializer where a benchmark gap is actually demonstrated.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
robertmarney/lara-hierarchial-collections
simonschaufi/rule-doc-generator
emissaoja/emissaoja
blackbricksoftware/gravityforms-civicrm-form-processor
al-rahabi/fancy-crud
jinas/dhivatar-component
mltstephane/laravel-quality
bernskiold/laravel-talentlms
bernskioldmedia/laravel-form-architect
youbar/easy-crud
c-point-labs/laravel-hostyourai
dbravoan/dbcms-admin-theme-dbcms
dbravoan/dbcms-theme-db-cyber
dbravoan/dbcms-blocks-basic
dbravoan/dbcms-module-content-audit
dbravoan/dbcms-module-ai-assistant
paygate-to/paygate-php
padosoft/askmydocs-connector-base
defstudio/supercharged-carbon
bernskioldmedia/laravel-matomo