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

Simple Doctrine Mapping Laravel Package

mmoreram/simple-doctrine-mapping

Add Doctrine entity mapping to Symfony bundles without relying on Doctrine auto_mapping. Define entity class, mapping file path, and manager via a simple CompilerPass, enabling clean, per-bundle configuration and easy overrides/customization.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Decoupled Entity Management: Enables teams to manage Doctrine entity mappings independently per bundle, reducing tight coupling with core application logic. Ideal for modular architectures (e.g., microservices, plugin systems, or feature flags).
  • Customization Without Forking: Allows third-party developers (e.g., SaaS partners, marketplace vendors) to override or extend entity mappings without modifying the base code, aligning with open-core or extensibility strategies.
  • Legacy Modernization: Accelerates migration of legacy Symfony2 projects to Doctrine ORM by providing a lightweight alternative to auto_mapping, avoiding full schema refactoring upfront.
  • Bundle Isolation: Supports multi-vendor ecosystems (e.g., e-commerce platforms with marketplace sellers) where each vendor controls their own data models without affecting others.
  • Roadmap Trade-offs:
    • Build vs. Buy: Justify not building a custom mapping system if the package meets 80% of needs (e.g., for internal tools or MVPs).
    • Tech Debt: Prioritize this over full Doctrine auto-mapping if the team lacks ORM expertise or needs faster iteration.
  • Use Cases:
    • SaaS Platforms: Dynamic tenant-specific schemas (e.g., multi-tenant CRM).
    • Content Management: Custom content types per site (e.g., WordPress-like plugins).
    • Data Portability: Export/import tools where entities must map to external schemas (e.g., ERP integrations).

When to Consider This Package

Adopt When:

  • Your project uses Symfony2 and requires lightweight Doctrine entity mapping without auto_mapping complexity.
  • You need bundle-level isolation for entities (e.g., plugins, microservices, or modular monoliths).
  • Your team prioritizes simplicity over advanced Doctrine features (e.g., no need for metadata caching, annotations, or YAML/XML configs).
  • You’re building a developer-facing platform where third parties must extend entity definitions (e.g., APIs, SDKs, or marketplace apps).
  • Legacy constraints: Migrating from non-Doctrine ORMs or need to avoid auto_mapping for performance/caching reasons.
  • Low-risk prototyping: Validating entity designs before committing to full Doctrine auto-mapping.

Look Elsewhere If:

  • You’re using Symfony 3.4+ or 4/5: This package is unmaintained (last release 2016) and may conflict with modern Doctrine versions.
  • You need advanced Doctrine features:
    • Metadata caching (APCu, Redis).
    • Dynamic entity generation (e.g., GraphQL schemas).
    • Complex inheritance/mapping (e.g., MappedSuperclass, embedded entities).
  • Your project requires active maintenance or PHP 7.4+ compatibility.
  • You’re building a greenfield app with no legacy Symfony2 constraints—consider Doctrine ORM’s auto-mapping or API Platform instead.
  • You need multi-database support or custom repository logic—this package focuses solely on mapping, not runtime behavior.

How to Pitch It (Stakeholders)

For Executives:

*"This package lets us ship modular features faster by letting each team or third party manage their own database schemas—without waiting on centralized ORM setup. Think of it like ‘plugins for your database.’ For example:

  • Marketplace vendors can define their own product entities without touching our core code.
  • Legacy systems can migrate incrementally by mapping only critical tables first.
  • Reduces tech debt by avoiding over-engineered ORM configurations upfront.

It’s a low-risk bet because it’s MIT-licensed and simple, but it unlocks scalability for our modular roadmap. The trade-off? We’d need to maintain a wrapper layer for any advanced Doctrine needs later."*

For Engineering:

*"This solves two key pain points:

  1. Decoupling: No more fighting with auto_mapping or global Doctrine configs. Each bundle owns its entities—ideal for plugins, microservices, or multi-tenant setups.
  2. Customization: Third parties (or future us) can override mappings via compiler passes, which is cleaner than hacking YAML or annotations.

Pros:

  • Lightweight: No bloat from full Doctrine auto-mapping.
  • Symfony-native: Integrates via CompilerPass, so it plays well with existing bundles.
  • Future-proof: If we outgrow it, we can replace the mapping layer without rewriting business logic.

Cons:

  • Unmaintained: Last release was 2016, but it’s a compile-time tool—if it works for Symfony2, it’s stable. We’d need to test with our Doctrine version.
  • Not a silver bullet: Won’t handle complex inheritance or runtime logic—just mapping.

Recommendation: Use this for modular features (e.g., plugins, SaaS extensions) where isolation is critical. Pair it with a custom wrapper to abstract away any Doctrine gaps later. For core entities, evaluate if auto_mapping or API Platform fits better."*


Key Metric to Track: "Time saved onboarding new bundles/entities" (e.g., "Reduced entity setup from 2 hours to 15 minutes").

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.
terminal42/code-quality-tools
codifyo/ts-generator-bundle
andydefer/laravel-cluster
testo/fiber
mintobit/jobqueue
a4sex/maintenance-bundle
a4sex/entity-date-update
a4sex/client-identifier
a4sex/base-utilites
a4sex/key-value-storage
a4sex/micro-status
chilldev/dependency-injection-extra
datinglibre/datinglibre-app-api
biberltd/corebundle
bricre/symfony-bundle-test
biberltd/logbundle
dominium/http-adapter-bundle
dominium/google-analytics
a4sex/auto-clean-entity
christhompsontldr/laravel-inky