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

Laravel Object Mapper Laravel Package

shureban/laravel-object-mapper

Laravel object mapper maps JSON strings, arrays, and FormRequest data into typed PHP objects (DTOs) using reflection. Use inheritance, a trait, or ObjectMapper directly; supports readonly DTOs and static constructors. Works out of the box via auto-discovery.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Data Transformation Efficiency: Enables seamless conversion between snake_case (common in databases/APIs) and camelCase (common in frontend frameworks like Vue/React), reducing manual mapping boilerplate in Laravel applications.
  • API/Backend Consistency: Simplifies alignment between database models, API responses, and frontend consumption by automating case transformation.
  • Developer Productivity: Reduces repetitive code for serialization/deserialization, accelerating feature development and maintenance.
  • Roadmap for Standardization: Supports a long-term strategy to enforce consistent data formatting across microservices or monolithic Laravel applications.
  • Framework Lifecycle Planning: v2.0.1 adds Laravel 13 support, which matters for upgrade planning—this is a dependency you can carry into the next Laravel major without a replacement decision.
  • Build vs. Buy Decision: Justifies adopting this lightweight package over custom solutions for case conversion, especially in teams prioritizing maintainability over reinventing wheels.
  • Version-Track Risk: The package is now on a 2.x line (previous assessment covered 1.2.0). Budget upgrade verification for any code still on 1.x before committing it to a roadmap.

When to Consider This Package

  • Use Case Fit: Ideal for Laravel applications handling mixed-case data (e.g., APIs, admin panels, or integrations with frontend frameworks).
  • Framework Compatibility: Confirm your Laravel version is supported—Laravel 13 is now covered as of v2.0.1; older supported majors should be validated against the package's version constraints during install.
  • Team Maturity: Best suited for teams comfortable with Laravel’s ecosystem and dependency management (Composer).
  • Performance Needs: Low-overhead for most use cases; benchmark if processing high-frequency transformations (e.g., real-time data pipelines).
  • Alternatives to Explore:
    • Custom Solutions: If the package’s snake_case/camelCase logic doesn’t align with niche requirements (e.g., custom naming conventions).
    • Framework-Built Tools: For non-Laravel projects, consider native PHP tools like Str::camel() or frontend-specific libraries.
    • ORM-Level Solutions: If using Eloquent, evaluate built-in $casts or API resources for simpler cases.
  • Upgrade Path Caution: If you're on 1.x, treat the move to 2.x as a breaking-change migration—pin versions, review the v2.0.0 changelog, and run regression tests on mapping behavior before rollout.
  • Avoid If: Your project already has a robust, tested in-house solution or requires complex transformations beyond case conversion.

How to Pitch It (Stakeholders)

Executives: "This Laravel package automates the tedious task of converting database snake_case fields (e.g., user_name) to camelCase (userName) for APIs and frontend consumption. It saves development time, reduces bugs from manual mapping, and aligns with modern frontend frameworks. The latest release (v2.0.1) also supports Laravel 13, so this is a low-risk, long-lived dependency rather than something we'll need to rip out at the next framework upgrade. Note we're now on a new major version line (2.x), so any existing 1.x usage needs a short, planned migration."

Engineering/Tech Leads: "v2.0.1 adds Laravel 13 compatibility on top of the 2.x line—no new features, but it confirms the package is actively maintained against current framework releases. If you're still on 1.2.0, plan the 2.x upgrade explicitly: it's a major version bump, so review the v2.0.0 changelog for breaking changes, update your Composer constraint, and regression-test mapping output before merging. For new projects on Laravel 13, this is a safe adopt with no additional integration work. Lightweight, Composer-installed, and consistent with Laravel conventions."

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.
ably/pubsub-server
mstfkhazaal/defender
mfonte/base62x
karnoweb/metapilot
tobya/bcsapiwrapper
swalker2/cpanel
vish4395/laravel-translation-manager
morningtrain/economic
teksite/systeminfo-laravel
atomcms/voting
run6/weather
siokas/laravelembeddirectives
adamlien/pkuuids
gilsonsouza/lara-doc-generator
manelgavalda/enrollment_mobile
unabomber/timezone
delatbabel/contacts
astritzeqiri/g-recaptcha
kevinongko/laravel-genode
developeruz/laravel-analytics