Skip to content

Recommend to install ORM pack instead of Doctrine bundle #10127

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 3 commits into from
Sep 24, 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
10 changes: 5 additions & 5 deletions doctrine/dbal.rst
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ makes it easy to execute queries and perform other database actions.
Read the official Doctrine `DBAL Documentation`_ to learn all the details
and capabilities of Doctrine's DBAL library.

First, install the Doctrine bundle:
First, install the Doctrine ORM pack:

.. code-block:: terminal

$ composer require doctrine/doctrine-bundle
$ composer require symfony/orm-pack

Then configure the ``DATABASE_URL`` environment variable in ``.env``:

Expand All @@ -36,9 +36,9 @@ Then configure the ``DATABASE_URL`` environment variable in ``.env``:
# customize this line!
DATABASE_URL="mysql://db_user:db_password@127.0.0.1:3306/db_name"

Further things can be configured in ``config/packages/doctrine.yaml``. For the full
DBAL configuration options, or to learn how to configure multiple connections,
see :ref:`reference-dbal-configuration`.
Further things can be configured in ``config/packages/doctrine.yaml`` - see
:ref:`reference-dbal-configuration`. Remove the ``orm`` key in that file
if you *don't* want to use the Doctrine ORM.
Copy link
Member

Choose a reason for hiding this comment

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

We could also explain how to remove the ORM package. But that would get much more complicated (unpacking the pack first and so on). We don't have any docs about packs where we could link to, do we?


You can then access the Doctrine DBAL connection by autowiring the ``Connection``
object::
Expand Down