Skip to content
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
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
15 changes: 14 additions & 1 deletion reference/configuration/doctrine.rst
Expand Up @@ -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
Copy link
Member

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

Copy link
Contributor Author

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?

Copy link
Member

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

Copy link
Contributor Author

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)?

Copy link
Member

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...

url: mysql://db_user:db_password@127.0.0.1:3306/db_name
# the DBAL driverClass option
driver_class: App\DBAL\MyDatabaseDriver
Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -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::
Copy link
Contributor Author

Choose a reason for hiding this comment

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

ci complained about .. versionadded:: 2.3.

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:

Expand Down