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.
auto_mapping overhead, giving explicit control over entity mapping per bundle.MappingDriver changes).CompilerPass implementation per bundle, adding boilerplate.MappingDriver, MetadataFactory) may have changed.CompilerPass logic may break with Symfony updates (e.g., container compilation changes).CompilerPass with Symfony’s ContainerConfigurator (if using Symfony 5.3+).MappingDriver integration.auto_mapping or attribute-mapped entities coexist with this package?CompilerPass add measurable overhead during container compilation?doctrine/orm’s built-in MappingDriver or Attribute mapping suffice with minimal customization?API Platform, NelmioApiDocBundle) that handle entity mapping more elegantly?CompilerPass).MappingDriver changes (e.g., Attribute support).auto_mapping or attribute-based mappings.CompilerPass implementation.CompilerPass with ContainerConfigurator (Symfony 5.3+).vendor/simple-doctrine-mapping-modern).EntityMapperInterface).auto_mapping for new entities in favor of attribute mapping or this package.CompilerPass API may differ in Symfony 5.3+ (use ContainerConfigurator instead).DependencyInjection classes).Attribute + YamlFileDriver/XmlFileDriver. May need a custom driver.MetadataFactory is configured to use the package’s mappings.auto_mapping, XML/YAML files).CompilerPass in target bundles.php bin/console doctrine:schema:validate.CompilerPass logic.auto_mapping (clear YAML/XML files).CompilerPass requires maintenance if Symfony updates break it.CompilerPass setup.cache:clear or debug:container.CompilerPass and mapping files.| Failure Scenario | Impact | Mitigation |
|---|---|---|
| Doctrine metadata corruption | Entities fail to map to DB | Validate with doctrine:schema:validate |
CompilerPass breaks on Symfony update |
Build fails | Pin Symfony version or fork |
| Mapping file syntax errors | Runtime InvalidArgumentException |
CI checks for YAML/XML validation |
Conflict with auto_mapping |
Duplicate entities | Exclude bundles from auto_mapping |
| PHP |
How can I help you explore Laravel packages today?