Weave Code
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

Doctrine Entity Generator Laravel Package

brokalia/doctrine-entity-generator

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Domain-Driven Design (DDD) Adoption: Accelerates implementation of DDD by automating the mapping between domain entities (rich objects with value objects) and Doctrine entities, reducing boilerplate and ensuring consistency.
  • Separation of Concerns: Enables clean architecture by enforcing a strict boundary between domain logic (business rules) and persistence (Doctrine entities), aligning with layered architecture principles.
  • Developer Productivity: Reduces manual scaffolding of Doctrine entities, allowing teams to focus on core business logic rather than repetitive ORM configurations.
  • Roadmap for Microservices: Facilitates the decomposition of monolithic applications into microservices by standardizing how domain entities are persisted across services.
  • Build vs. Buy: Justifies building a custom solution over buying a full-fledged ORM tool (e.g., Eloquent) if the team prioritizes DDD and strict domain-layer purity.
  • Use Cases:
    • Greenfield projects adopting DDD from the start.
    • Refactoring legacy monoliths to introduce domain layers.
    • Teams where Doctrine is already the ORM of choice but manual entity mapping is a bottleneck.

When to Consider This Package

  • Adopt if:

    • Your team is committed to Domain-Driven Design and needs to enforce a clear separation between domain and persistence layers.
    • You’re using Doctrine ORM and want to automate the generation of entity mappers to reduce manual work.
    • Your domain entities include value objects or complex types that require explicit mapping to Doctrine columns.
    • You prioritize developer velocity over minimalist ORM configurations (e.g., Eloquent’s "convention over configuration").
    • Your project has stable domain models (the generator works best with well-defined domain entities).
  • Look elsewhere if:

    • You’re using Eloquent or another ORM that handles mappings more seamlessly out of the box.
    • Your team prefers minimalist abstractions and doesn’t need explicit domain-persistence separation.
    • Your domain entities are highly dynamic or frequently change (the generator may require manual overrides).
    • You’re not using Doctrine ORM (this package is tightly coupled to it).
    • Your project lacks Symfony (though the bundle could theoretically be adapted for standalone Laravel with effort).
    • You need active maintenance (last release was 2022; consider forking or supplementing with custom scripts).

How to Pitch It (Stakeholders)

For Executives:

*"This package automates the tedious work of mapping domain entities to database tables, letting our developers focus on building business logic rather than writing boilerplate code. By enforcing a clean separation between domain models (which represent our core business rules) and database persistence, we can:

  • Ship features faster by reducing manual scaffolding.
  • Improve code quality with consistent, automated mappings.
  • Future-proof our architecture for microservices or refactoring. It’s a low-risk investment (open-source, minimal dependencies) that aligns with our DDD strategy and Doctrine stack."*

For Engineering:

*"This Symfony bundle solves a pain point for teams using DDD with Doctrine: manually writing mapper classes and ORM annotations for every domain entity. With a single CLI command, it generates:

  • Doctrine entities with proper @ORM annotations.
  • Mapper classes to bridge domain and persistence layers. This cuts entity generation time by ~80% and enforces consistency. Trade-offs:
  • Pros: Faster iteration, cleaner architecture, less manual error-prone mapping.
  • Cons: Requires stable domain models; last release was 2022 (but the core logic is solid). We’d need to evaluate whether to fork for Laravel or integrate it via Symfony’s console component. Worth testing in a spike."*
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.
daikazu/eloquent-salesforce-objects
unseen-codes/chat
romalytar/yammi-jobs-monitoring-laravel
kisame76/filament-db-table-state
nqxcode/laravel-lucene-search
dpfx/laravel-livewire-wizards
workos/workos-php-laravel
sofa/laravel-global-scope
nawasara/auth-primitives
adhocrat-io/arkhe-main
make-dev/orca-harpoon
itsemon245/lamet
baks-dev/dashboard
amoifr/pickle-panther-bundle
make-dev/orca
dmstr/symfony-system-resources-bundle
dmstr/symfony-job-queue-bundle
dmstr/openapi-json-schema-bundle
dmstr/keycloak-security-bundle
dmstr/doctrine-audit-log-bundle