Skip to content

Added support for server_version connection parameter#329

Closed
adrianolek wants to merge 3 commits intodoctrine:masterfrom
adrianolek:dbal-serverVersion
Closed

Added support for server_version connection parameter#329
adrianolek wants to merge 3 commits intodoctrine:masterfrom
adrianolek:dbal-serverVersion

Conversation

@adrianolek
Copy link
Copy Markdown
Contributor

Doctrine DBAL 2.5 will support platform version autodetection, additionally it allows specifying serverVersion connection parameter:

which the user can pass to skip platform autodetection and define the desired platform version straight away. This is also required for drivers that cannot return the database server version without an additional query (performance reasons).
doctrine/dbal#487

In symfony it can be useful eg. when warming up cache during build, so you don't need the db connection, but dbal 2.5 will try to autodetect server version anyway eg. during entity class metadata loading, then it will throw an exception because of unavailable connection. server_version parameter can be used to skip the autodetection.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please use an underscored version in the config, to fit the Symfony convention in YAML and XML files.

the name should then be mapped to the camelCased key used by Doctrine in the DI extension (we already do it a lot)

@adrianolek
Copy link
Copy Markdown
Contributor Author

Done

@adrianolek adrianolek changed the title Added support for serverVersion connection parameter Added support for server_version connection parameter Sep 5, 2014
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please add the end of line at the end of the file

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be ok now.

@stof
Copy link
Copy Markdown
Member

stof commented Sep 5, 2014

Thank you @adrianolek.

@stof stof closed this in ccf2130 Sep 5, 2014
@deeky666
Copy link
Copy Markdown
Member

deeky666 commented Sep 6, 2014

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants