@@ -278,45 +278,15 @@ Automatic platform version detection
278
278
279
279
Doctrine ships with different database platform implementations for some vendors
280
280
to support version specific features, dialect and behaviour.
281
- As of Doctrine DBAL 2.5 the appropriate platform implementation for the underlying
282
- database server version can be detected at runtime automatically for nearly all drivers.
283
- Before 2.5 you had to configure Doctrine to use a certain platform implementation
284
- explicitly with the ``platform `` connection parameter (see section below).
285
- Otherwise Doctrine always used a default platform implementation. For example if
286
- your application was backed by a SQL Server 2012 database, Doctrine would still use
287
- the SQL Server 2008 platform implementation as it is the default, unless you told
288
- Doctrine explicitly to use the SQL Server 2012 implementation.
289
-
290
- The following drivers support automatic database platform detection out of the box
291
- without any extra configuration required:
292
-
293
- - ``pdo_mysql ``
294
- - ``mysqli ``
295
- - ``pdo_pgsql ``
296
- - ``pdo_sqlsrv ``
297
- - ``sqlsrv ``
298
-
299
- Some drivers cannot provide the version of the underlying database server without
300
- having to query for it explicitly.
301
-
302
- If you still want to tell Doctrine which database server version you are using in
303
- order to choose the appropriate platform implementation, you can pass the
304
- ``serverVersion `` option with a vendor specific version string that matches the
305
- database server version you are using.
306
- You can also pass this option if you want to disable automatic database platform
307
- detection for a driver that natively supports it and choose the platform version
308
- implementation explicitly.
309
281
310
- If you are running a MariaDB database, you should prefix the `` serverVersion ``
311
- with `` mariadb- `` (ex: `` mariadb-10.2.12 ``) .
282
+ The drivers will automatically detect the platform version and instantiate
283
+ the corresponding platform class .
312
284
313
- Custom Platform
314
- ~~~~~~~~~~~~~~~
285
+ You can also pass the `` serverVersion `` option if you want to disable automatic
286
+ database platform detection and choose the platform version implementation explicitly.
315
287
316
- Each built-in driver uses a default implementation of
317
- ``Doctrine\DBAL\Platforms\AbstractPlatform ``. If you wish to use a
318
- customized or custom implementation, you can pass a precreated
319
- instance in the ``platform `` option.
288
+ If you are running a MariaDB database, you should prefix the ``serverVersion ``
289
+ with ``mariadb- `` (ex: ``mariadb-10.2.12 ``).
320
290
321
291
Custom Driver Options
322
292
~~~~~~~~~~~~~~~~~~~~~
0 commit comments