Add mongodb-odm-bundle recipe for version 4.4 (#1400)

Fixes: Since doctrine/mongodb-odm-bundle 4.4: Configuring doctrine/cache is deprecated. Please update the cache service "doctrine_mongodb.system_cache_provider" to use a PSR-6 cache.
This commit is contained in:
Martin Klewitz
2022-07-08 13:12:21 +02:00
committed by GitHub
parent bacf328911
commit bb177d379b
3 changed files with 51 additions and 0 deletions

View File

@@ -0,0 +1,34 @@
doctrine_mongodb:
auto_generate_proxy_classes: true
auto_generate_hydrator_classes: true
connections:
default:
server: '%env(resolve:MONGODB_URL)%'
options: {}
default_database: '%env(resolve:MONGODB_DB)%'
document_managers:
default:
auto_mapping: true
mappings:
App:
is_bundle: false
type: annotation
dir: '%kernel.project_dir%/src/Document'
prefix: 'App\Document'
alias: App
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

View File

@@ -0,0 +1,17 @@
{
"bundles": {
"Doctrine\\Bundle\\MongoDBBundle\\DoctrineMongoDBBundle": ["all"]
},
"copy-from-recipe": {
"config/": "%CONFIG_DIR%/",
"src/": "%SRC_DIR%/"
},
"container": {
"env(MONGODB_URL)": "",
"env(MONGODB_DB)": ""
},
"env": {
"MONGODB_URL": "mongodb://localhost:27017",
"MONGODB_DB": "symfony"
}
}