Skip to content

Commit

Permalink
Added the composer.json update section (#995)
Browse files Browse the repository at this point in the history
An improvement suggested in #919 and #922
The final part is also removed as it is already provided in the `Doctrine Configuration` section.
  • Loading branch information
colshrapnel authored and greg0ire committed Jan 19, 2018
1 parent 2c0f726 commit 48f192e
Showing 1 changed file with 14 additions and 18 deletions.
32 changes: 14 additions & 18 deletions docs/reference/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 48f192e

Please sign in to comment.