beelab/memory-repository-bundle
DQL).ObjectRepository implementation, increasing maintenance burden.doctrine/orm:2.5.*@dev and doctrine-bundle:~1.3@beta is high-risk—these versions are unsupported and may break with modern PHP (8.1+).@Query).prePersist, postUpdate).BATCH mode).Why In-Memory?
Memory\MemoryConnection.Production Impact
LifecycleCallbacks, ChangeTracking) in tests?Migration Path
paragonie/random_compat for mocking, or Doctrine’s MockObject utilities)?Maintenance Burden
ObjectRepository implementations for every entity?Failure Modes
Test\WebTestCase for isolated testing.Short-Term (Tests Only)
composer.json (with pinned dev dependencies).ObjectRepository for critical test entities first.EntityManager with the bundle’s service in test contexts (e.g., via kernel.php overrides).Long-Term (Abandon or Replace)
MockObject utilities or doctrine/data-fixtures for test data.doctrine/dbal).phpunit/phpunit + doctrine/orm mocks.symfony/panther for browser tests.pestphp/pest for faster test execution.repositoryClass in @ORM\Entity.@InheritanceType).@After hooks).ObjectRepository per entity → scalability issue for large codebases.| Failure Scenario | Impact | Mitigation |
|---|---|---|
| Doctrine version conflict | Tests fail due to incompatible ORM. | Pin doctrine/orm to exact 2.5.x-dev version. |
| In-memory state leakage | Test A’s data affects Test B. | Clear repos in @After hooks or use MemoryRepositoryBundle's reset() method. |
| Missing Doctrine features | Tests pass but fail in production (e.g., prePersist callbacks ignored). |
Mock missing features manually or avoid using them in tests. |
| Schema drift | Production schema changes break test repos. | Sync schema changes manually or use migrations in tests. |
| PHP version incompatibility | Bundle fails on PHP 8.x. | Downgrade PHP or replace the bundle. |
| Bundle abandonment | No updates for security/CVE fixes. | Plan to replace within 6–12 months. |
ObjectRepository.How can I help you explore Laravel packages today?