doctrine / doctrine/DoctrineMongoDBBundle

Update default options

Open
#973 1 comment 0 reactions 0 assignees View on GitHub
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.