@@ -109,25 +109,25 @@ The following block shows all possible configuration keys:
|
109 | 109 |
|
110 | 110 | $dbal = $dbal
|
111 | 111 | ->connection('default')
|
112 |
| -->dbname('database') |
113 |
| -->host('localhost') |
114 |
| -->port(1234) |
115 |
| -->user('user') |
116 |
| -->password('secret') |
117 |
| -->driver('pdo_mysql') |
118 |
| -->url('mysql://db_user:[email protected]:3306/db_name') // if the url option is specified, it will override the above config |
119 |
| -->driverClass(App\DBAL\MyDatabaseDriver::class) // the DBAL driverClass option |
120 |
| -->option('foo', 'bar') // the DBAL driverOptions option |
121 |
| -->path('%kernel.project_dir%/var/data/data.sqlite') |
122 |
| -->memory(true) |
123 |
| -->unixSocket('/tmp/mysql.sock') |
124 |
| -->wrapperClass(App\DBAL\MyConnectionWrapper::class) // the DBAL wrapperClass option |
125 |
| -->charset('utf8mb4') |
126 |
| -->logging('%kernel.debug%') |
127 |
| -->platformService(App\DBAL\MyDatabasePlatformService::class) |
128 |
| -->serverVersion('8.0.37') |
129 |
| -->mappingType('enum', 'string') |
130 |
| -->type('custom', App\DBAL\MyCustomType::class); |
| 112 | +->dbname('database') |
| 113 | +->host('localhost') |
| 114 | +->port(1234) |
| 115 | +->user('user') |
| 116 | +->password('secret') |
| 117 | +->driver('pdo_mysql') |
| 118 | +->url('mysql://db_user:[email protected]:3306/db_name') // if the url option is specified, it will override the above config |
| 119 | +->driverClass(App\DBAL\MyDatabaseDriver::class) // the DBAL driverClass option |
| 120 | +->option('foo', 'bar') // the DBAL driverOptions option |
| 121 | +->path('%kernel.project_dir%/var/data/data.sqlite') |
| 122 | +->memory(true) |
| 123 | +->unixSocket('/tmp/mysql.sock') |
| 124 | +->wrapperClass(App\DBAL\MyConnectionWrapper::class) // the DBAL wrapperClass option |
| 125 | +->charset('utf8mb4') |
| 126 | +->logging('%kernel.debug%') |
| 127 | +->platformService(App\DBAL\MyDatabasePlatformService::class) |
| 128 | +->serverVersion('8.0.37') |
| 129 | +->mappingType('enum', 'string') |
| 130 | +->type('custom', App\DBAL\MyCustomType::class); |
131 | 131 | };
|
132 | 132 |
|
133 | 133 | .. note::
|
@@ -255,16 +255,13 @@ that the ORM resolves to:
|
255 | 255 | ->entityManager('default')
|
256 | 256 | ->connection('default')
|
257 | 257 | ->autoMapping(true)
|
258 |
| -->metadataCacheDriver() |
259 |
| -->type('array') |
260 |
| -->queryCacheDriver() |
261 |
| -->type('array') |
262 |
| -->resultCacheDriver() |
263 |
| -->type('array') |
| 258 | +->metadataCacheDriver()->type('array') |
| 259 | +->queryCacheDriver()->type('array') |
| 260 | +->resultCacheDriver()->type('array') |
264 | 261 | ->namingStrategy('doctrine.orm.naming_strategy.default');
|
265 | 262 |
|
266 | 263 | $orm
|
267 |
| -->autoGenerateProxyClasses(false) // the standard distribution overrides this to be true in debug, false otherwise |
| 264 | +->autoGenerateProxyClasses(false) |
268 | 265 | ->proxyNamespace('Proxies')
|
269 | 266 | ->proxyDir('%kernel.cache_dir%/doctrine/orm/Proxies')
|
270 | 267 | ->defaultEntityManager('default');
|
@@ -339,8 +336,8 @@ to cache each of Doctrine ORM elements (queries, results, etc.):
|
339 | 336 | type: pool
|
340 | 337 | pool: doctrine.result_cache_pool
|
341 | 338 |
|
342 |
| -# in addition to Symfony Cache pools, you can also use the |
343 |
| -# 'type: service' option to use any service as the cache |
| 339 | +# in addition to Symfony cache pools, you can also use the |
| 340 | +# 'type: service' option to use any service as a cache pool |
344 | 341 | query_cache_driver:
|
345 | 342 | type: service
|
346 | 343 | id: App\ORM\MyCacheService
|
@@ -371,8 +368,8 @@ to cache each of Doctrine ORM elements (queries, results, etc.):
|
371 | 368 | ->type('pool')
|
372 | 369 | ->pool('doctrine.result_cache_pool')
|
373 | 370 |
|
374 |
| -// in addition to Symfony Cache pools, you can also use the |
375 |
| -// 'type: service' option to use any service as the cache |
| 371 | +// in addition to Symfony cache pools, you can also use the |
| 372 | +// 'type: service' option to use any service as a cache pool |
376 | 373 | ->queryCacheDriver()
|
377 | 374 | ->type('service')
|
378 | 375 | ->id(App\ORM\MyCacheService::class);
|
|
0 commit comments