File tree

1 file changed

+27
-30
lines changed

1 file changed

+27
-30
lines changed
Original file line numberDiff line numberDiff line change
@@ -109,25 +109,25 @@ The following block shows all possible configuration keys:
109109
110110
$dbal = $dbal
111111
->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);
131131
};
132132
133133
.. note::
@@ -255,16 +255,13 @@ that the ORM resolves to:
255255
->entityManager('default')
256256
->connection('default')
257257
->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')
264261
->namingStrategy('doctrine.orm.naming_strategy.default');
265262
266263
$orm
267-
->autoGenerateProxyClasses(false) // the standard distribution overrides this to be true in debug, false otherwise
264+
->autoGenerateProxyClasses(false)
268265
->proxyNamespace('Proxies')
269266
->proxyDir('%kernel.cache_dir%/doctrine/orm/Proxies')
270267
->defaultEntityManager('default');
@@ -339,8 +336,8 @@ to cache each of Doctrine ORM elements (queries, results, etc.):
339336
type: pool
340337
pool: doctrine.result_cache_pool
341338
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
344341
query_cache_driver:
345342
type: service
346343
id: App\ORM\MyCacheService
@@ -371,8 +368,8 @@ to cache each of Doctrine ORM elements (queries, results, etc.):
371368
->type('pool')
372369
->pool('doctrine.result_cache_pool')
373370
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
376373
->queryCacheDriver()
377374
->type('service')
378375
->id(App\ORM\MyCacheService::class);

0 commit comments

Comments
 (0)