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
Entity Manager Generator Bundle

Entity Manager Generator Bundle Laravel Package

activpik/entity-manager-generator-bundle

Symfony2 bundle that generates basic Doctrine Entity Manager classes for your entities and registers them as services (services.xml). Adds save() and getRepository() helpers. Use doctrine:generate:entitymanager Bundle:Entity, then fetch via service id.

View on GitHub
Deep Wiki
Context7

Entity Manager Generator for Symfony 2

Frequently asked questions about Entity Manager Generator Bundle
Can I use EntityManagerGeneratorBundle with Laravel or Symfony 5/6/7?
No, this package is designed exclusively for Symfony 2, which reached end-of-life in 2023. It won’t work with Laravel or modern Symfony versions (5/6/7+) due to incompatible service wiring (services.xml) and Doctrine ORM assumptions. You’d need a full rewrite or fork to adapt it.
What Laravel alternatives exist for auto-generating entity managers?
For Laravel, consider Spatie’s packages (e.g., `spatie/laravel-model-states` for soft deletes) or manually create service classes using Laravel’s service container. Alternatively, use Doctrine Extensions or API Platform’s generator if migrating to Symfony. Laravel’s Eloquent already provides repositories natively, reducing the need for custom managers.
How do I install EntityManagerGeneratorBundle in Symfony 2?
Add `"activpik/entity-manager-generator-bundle": "dev-master"` to your `composer.json`, run `composer update`, then register the bundle in `AppKernel.php`. Note: This is unstable (dev-only) and tied to Symfony 2, which is deprecated. Avoid for new projects.
Does this bundle support Doctrine ORM 2.10+ (Symfony 5+)?
No, the bundle is untested with Doctrine ORM 2.10+ and relies on Symfony 2’s EntityManager patterns. Upgrading would require significant refactoring, including replacing services.xml with autowiring (YAML/PHP) and handling breaking changes in Doctrine’s API. No guarantees exist for compatibility.
What’s the performance impact of generated manager classes vs. native repositories?
Generated managers add minimal overhead (e.g., reflection for service injection), but they’re redundant in Laravel/Symfony 5+. Native repositories (e.g., `EntityManager::getRepository()`) or service classes with dependency injection are more performant and maintainable. Avoid this bundle if you prioritize efficiency.
Can I use this bundle in a CI/CD pipeline or monorepo?
The bundle’s CLI command (`doctrine:generate:entitymanager`) may not integrate smoothly with modern CI/CD tools or monorepos due to its Symfony 2 dependency. Laravel uses Artisan commands (e.g., `make:model`), which are more flexible. For Symfony, consider Symfony’s `make:crud` or custom generators.
How does this bundle fit with Domain-Driven Design (DDD) or clean architecture?
This bundle encourages anemic domain models by generating CRUD-focused managers (e.g., `save()`, `getRepository()`), which conflicts with DDD’s emphasis on rich domain entities and repository patterns. In Laravel, prefer service classes with clear responsibilities or use packages like `spatie/laravel-data` for DDD-friendly data transfer.
What’s the maintenance risk of using this package?
High. The package has no stars, dependents, or recent commits, indicating abandonment. Symfony 2’s EOL status means no future updates for Doctrine/Symfony changes. Forking would require ongoing sync efforts, while alternatives (e.g., Spatie’s packages) are actively maintained.
How do I migrate from this bundle to a modern Symfony 5/6/7 solution?
Replace the bundle with Symfony’s `make:crud` or custom service generators. Delete generated managers and use autowiring (e.g., `config/services.yaml`) to register repositories or services. For Laravel, leverage Eloquent’s built-in repositories or create service classes with Laravel’s container.
Are there any security concerns with using dev-master dependencies?
Yes. Using `dev-master` introduces instability, untested code, and potential security risks (e.g., missing dependency checks). In production, avoid dev branches. For Laravel/Symfony, prefer stable packages like `spatie/laravel-permission` or `symfony/maker-bundle` (Symfony 4+).
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.
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
dmstr/api-platform-utils-bundle
dmstr/api-configuration-bundle
chrisdev/ux-components
baks-dev/finances
emuniq/filament-browser-notifications
syriable/filament-translator
hungnm28/livewire-form
wenprise/eloquent
crudly/encrypted
fadion/bouncy
cuci/prototurk-sdk
gos/pubsub-router-bundle
cuci/prototurk-sdk-symfony
clementtalleu/easyadmin-markdown-bundle