Skip to content

Commit d579eea

Browse files
LavaSliderToflar
authored andcommitted
Add Doctrine ORM installation instructions.
This best practices page assumes Doctrine is available and, since it is not, the reader is given a little extra information and a link to know how to make it available and be able to continue through the rest of the examples. This makes it consistent with the Data Fixtures description later on the page.
1 parent 02ba51f commit d579eea

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

best_practices/business-logic.rst

Lines changed: 10 additions & 0 deletions
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 `Doctrine ORM support`_
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

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