Skip to content

Commit 5761199

Browse files
committed
minor #11332 Add doctrine orm installation instructions (LavaSlider, Toflar)
This PR was merged into the 3.4 branch. Discussion ---------- Add doctrine orm installation instructions Follow up branch of #10798 including the requested changes. Also changed the base branch to 3.4 because it applies there too :) Commits ------- 6d164c3 Addressed issues raised in (#10798) d579eea Add Doctrine ORM installation instructions.
2 parents 010ceef + 6d164c3 commit 5761199

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

best_practices/business-logic.rst

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,15 @@ library or strategy you want for this.
191191

192192
In practice, many Symfony applications rely on the independent
193193
`Doctrine project`_ to define their model using entities and repositories.
194+
195+
Doctrine support is not enabled by default in Symfony. So to use Doctrine
196+
as shown in the examples below you will need to install :doc:`Doctrine ORM support </doctrine>`
197+
by executing the following command:
198+
199+
.. code-block:: terminal
200+
201+
$ composer require symfony/orm-pack
202+
194203
Just like with business logic, we recommend storing Doctrine entities in the
195204
AppBundle.
196205

@@ -301,7 +310,7 @@ the following command to install the Doctrine fixtures bundle:
301310

302311
.. code-block:: terminal
303312
304-
$ composer require "doctrine/doctrine-fixtures-bundle"
313+
$ composer require doctrine/doctrine-fixtures-bundle
305314
306315
Then, enable the bundle in ``AppKernel.php``, but only for the ``dev`` and
307316
``test`` environments::
@@ -357,6 +366,7 @@ Next: :doc:`/best_practices/controllers`
357366

358367
.. _`full definition`: https://en.wikipedia.org/wiki/Business_logic
359368
.. _`Doctrine project`: http://www.doctrine-project.org/
369+
.. _`Doctrine ORM support`: https://symfony.com/doc/current/doctrine.html
360370
.. _`fixture class`: https://symfony.com/doc/current/bundles/DoctrineFixturesBundle/index.html#writing-simple-fixtures
361371
.. _`PSR-1`: https://www.php-fig.org/psr/psr-1/
362372
.. _`PSR-2`: https://www.php-fig.org/psr/psr-2/

0 commit comments

Comments
 (0)