Skip to content

Commit

Permalink
Add Doctrine ORM installation instructions.
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
LavaSlider authored and Toflar committed Apr 7, 2019
1 parent 02ba51f commit d579eea
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions best_practices/business-logic.rst
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,15 @@ library or strategy you want for this.

In practice, many Symfony applications rely on the independent
`Doctrine project`_ to define their model using entities and repositories.

Doctrine support is not enabled by default in Symfony. So to use Doctrine
as shown in the examples below you will need to install `Doctrine ORM support`_
by executing the following command:

.. code-block:: terminal
$ composer require "symfony/orm-pack"
Just like with business logic, we recommend storing Doctrine entities in the
AppBundle.

Expand Down Expand Up @@ -357,6 +366,7 @@ Next: :doc:`/best_practices/controllers`

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

0 comments on commit d579eea

Please sign in to comment.