Skip to content

Server version should be specified as a string #9445

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Mar 18, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion reference/configuration/doctrine.rst
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ The following block shows all possible configuration keys:
charset: UTF8
logging: '%kernel.debug%'
platform_service: MyOwnDatabasePlatformService
server_version: 5.6
server_version: '5.6'
mapping_types:
enum: string
types:
Expand Down Expand Up @@ -362,6 +362,11 @@ The following block shows all possible configuration keys:
your database server version (use ``postgres -V`` or ``psql -V`` command
to find your PostgreSQL version and ``mysql -V`` to get your MySQL
version).

Always wrap the server version number with quotes to parse it as a string
instead of a float number. Otherwise, the floating-point representation
issues can make your version be considered a different number (e.g. ``5.6``
will be rounded as ``5.5999999999999996447286321199499070644378662109375``).

If you don't define this option and you haven't created your database
yet, you may get ``PDOException`` errors because Doctrine will try to
Expand Down