doctrine / doctrine/DoctrineMongoDBBundle
Update default options
- Dominant language
- PHP
- Stars
- 384
- Forks
- 228
- PR merge metrics
- No merged PRs in 30d
Description
Some default options should be modified so that we don't have to set them in the flex recipe: https://github.com/symfony/recipes/pull/1509
- [ ] `auto_generate_proxy_classes` and `auto_generate_hydrator_classes` should use the `dedug` flag by default.
- [ ] The metadata cache driver can be created internally
- [ ] Mapping should be done using auto-injection of the classes with `#[Document]` and equivalent attributes.
```diff
doctrine_mongodb:
- auto_generate_proxy_classes: true
- auto_generate_hydrator_classes: true
connections:
default:
server: '%env(MONGODB_URI)%'
- options: {}
default_database: '%env(MONGODB_DB)%'
document_managers:
default:
- auto_mapping: true
- mappings:
- App:
- dir: '%kernel.project_dir%/src/Document'
- prefix: 'App\Document'
-
-when@prod:
- doctrine_mongodb:
- auto_generate_proxy_classes: false
- auto_generate_hydrator_classes: false
- document_managers:
- default:
- metadata_cache_driver:
- type: service
- id: doctrine_mongodb.system_cache_pool
- framework:
- cache:
- pools:
- doctrine_mongodb.system_cache_pool:
- adapter: cache.system
```
Contributor guide
Assessment
This issue has not been assessed yet.