EntityManager configurations.DQL, Criteria).getProperty(), find()).QueryBuilder::expr()).| Risk Area | Severity | Mitigation Strategy |
|---|---|---|
| Metadata Factory Override | High | Test with doctrine:schema:validate and custom repositories. |
| Query Builder Assumptions | High | Audit all WHERE, JOIN, and SELECT clauses for excluded fields. |
| Raw SQL Dependencies | Medium | Document legacy SQL patterns requiring explicit field references. |
| CI/CD Pipeline Gaps | Medium | Implement pre-commit hooks or GitLab CI checks for @DisableORM misuse. |
| Future Doctrine Breaks | Low | Monitor Doctrine 3.x for metadata API changes. |
WHERE) that could break if fields are excluded?@DisableORM annotations as new fields are deprecated? Will this become a technical debt sink?@deprecated tags or legacy feature flags).composer require dualmedia/disable-orm-bundle --dev
config/bundles.php:
DualMedia\DisableORMBundle\DisableORMBundle::class => ['all' => true],
metadata_factory_name in config/packages/doctrine.yaml:
doctrine:
orm:
entity_managers:
default:
metadata_factory_name: DualMedia\DisableORMBundle\Metadata\Factory\DisableORMMetadataFactory
@DisableORM to target fields (PHP 8+ attributes or YAML annotations).php bin/console doctrine:schema:validate
$entity->getField()).$qb->select('e.field')).updatedAt is excluded.findBy()/findOneBy() methods don’t assume excluded fields exist.legacyUserId from UserEntity if migrated to OAuth.main.@DisableORM misuse:
includes:
- vendor/dualmedia/disable-orm-bundle/extension.neon
getExcludedField() is called).@deprecated in code.@DisableORM annotations may become stale if not updated alongside field deprecations.legacyField until Q3 2024").PropertyAccessException).EntityListeners.WHERE clauses).SELECT * fails, explicitly list fields in QueryBuilder."$entity->$field with $entity->{'field'} if field is excluded.JOIN e.legacyField will fail if legacyField is excluded.| Scenario | Impact | Recovery Plan |
|---|---|---|
Excluded field in WHERE clause |
Incorrect query results | Re-enable field or rewrite query. |
| Metadata factory conflict | ORM crashes on startup | Downgrade bundle or patch conflicts. |
| Forget to exclude field | Data corruption risk | CI checks for @DisableORM misuse. |
| Multi-version schema drift | Inconsistent data between versions | Freeze schema changes until alignment. |
| Raw SQL bypass issues | Legacy queries fail silently | Document required SQL patterns. |
How can I help you explore Laravel packages today?