From 48f192ecd2632619c491316c85cecaa41adcc5dd Mon Sep 17 00:00:00 2001
From: colshrapnel
Date: Fri, 19 Jan 2018 18:11:08 +0300
Subject: [PATCH] Added the composer.json update section (#995)
An improvement suggested in #919 and #922
The final part is also removed as it is already provided in the `Doctrine Configuration` section.
---
docs/reference/installation.rst | 32 ++++++++++++++------------------
1 file changed, 14 insertions(+), 18 deletions(-)
diff --git a/docs/reference/installation.rst b/docs/reference/installation.rst
index 5809c4ed0..864618313 100644
--- a/docs/reference/installation.rst
+++ b/docs/reference/installation.rst
@@ -265,27 +265,23 @@ Now, add the new ``Application`` Bundle into the kernel:
}
}
-And configure ``FosUserBundle`` to use the newly generated ``User`` and ``Group``
-classes:
+And then register the ``Application`` namespace in the ``composer.json``
+file under ``autoload/psr-4`` section::
+ {
+ "autoload": {
+ "psr-4": {
+ "AppBundle\\": "src/AppBundle",
+ "Application\\": "src/Application"
+ }
+ }
+ }
-.. code-block:: yaml
+and run
- # app/config/config.yml
+.. code-block:: bash
- fos_user:
- db_driver: orm # can be orm or odm
- firewall_name: main
- user_class: Application\Sonata\UserBundle\Entity\User
+ php composer.phar install
- group:
- group_class: Application\Sonata\UserBundle\Entity\Group
- group_manager: sonata.user.orm.group_manager # If you're using doctrine orm (use sonata.user.mongodb.group_manager for mongodb)
-
- service:
- user_manager: sonata.user.orm.user_manager # If you're using doctrine orm (use sonata.user.mongodb.user_manager for mongodb)
+to apply the change.
- doctrine:
- dbal:
- types:
- json: Sonata\Doctrine\Types\JsonType