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
[DoctrineBundle] document override_url #15321
Closed
Closed
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -50,7 +50,8 @@ The following block shows all possible configuration keys: | |
user: user | ||
password: secret | ||
driver: pdo_mysql | ||
# if the url option is specified, it will override the above config | ||
# until doctrine-bundle 2.2, the url option overrides the above config | ||
# since doctrine-bundle 2.3 it is recommended to set override_url: true, which allows the above config to override the parts of the url | ||
url: mysql://db_user:db_password@127.0.0.1:3306/db_name | ||
# the DBAL driverClass option | ||
driver_class: App\DBAL\MyDatabaseDriver | ||
|
@@ -91,6 +92,7 @@ The following block shows all possible configuration keys: | |
user="user" | ||
password="secret" | ||
driver="pdo_mysql" | ||
url="mysql://db_user:db_password@127.0.0.1:3306/db_name" | ||
driver-class="App\DBAL\MyDatabaseDriver" | ||
path="%kernel.project_dir%/var/data/data.sqlite" | ||
memory="true" | ||
|
@@ -128,6 +130,17 @@ The following block shows all possible configuration keys: | |
yet, you may get ``PDOException`` errors because Doctrine will try to | ||
guess the database server version automatically and none is available. | ||
|
||
.. note:: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ci complained about i just do a note as it seems we don't want versionadded for 3rd party components. |
||
|
||
Version 2.3 of the DoctrineBundle introduced the ``override_url`` option. | ||
When set to ``true``, each fragement of the ``url`` is overwritten by the | ||
respective configuration option if set. This allows to e.g. only change the | ||
database name for the test environment without having to repeat the whole | ||
``url``. | ||
|
||
Configuring Multiple Connections | ||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
|
||
If you want to configure multiple connections in YAML, put them under the | ||
``connections`` key and give them a unique name: | ||
|
||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually not, as we're going to deprecate override_url
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
are you reverting the feature? or will you do doctrine-bundle 3 and force the behaviour?
any suggestion what to say here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We are going to revert the feature yes. Maybe we should just keep the existing sentence
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah, then should i change the note to say that DoctrineBundle 2.3 introduced override_url but the feature will be retired and recommend to set override_url to false?
also, if you will revert anyways, why not change the recipe to not set override_url (or set it to false)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we merged the change yesterday :) symfony/recipes#939
maybe there is nothing to do...