Symfony 4 fosuserbundle

I am starting with Symfony 4 and I want to install FosUserBundle at this link: https://symfony.com/doc/master/bundles/FOSUserBundle/index.html

At first:

My problem is that I do not know where to find the file "app / config / config.yml" to uncomment the translator and configure:

fos_user:
db_driver: orm # other valid values are 'mongodb' and 'couchdb'
firewall_name: main
user_class: AppBundle\Entity\User
from_email:
    address: "%mailer_user%"
    sender_name: "%mailer_user%"

Second:

I think I need to create a security.yml file in the "config / packages /" directory, right?

Third:

And in which file to add the route?

Could you help me?:)

+4
source share
3 answers

This is the solution I found to work.

Firstly:

app/config/config.yml , . FOS User Bundle : /config/packages/fos_user.yaml. , dev-master FOSUserBundle, 4 ( , ).

-:

, - composer require security, . https://symfony.com/doc/current/security.html .

:

FOS User Bundle: fos_user: resource: "@FOSUserBundle/Resources/config/routing/all.xml"

FOS ( 6) https://symfony.com/doc/master/bundles/FOSUserBundle/index.html

, yaml symfony. FOS User Bundle. https://symfony.com/doc/current/routing.html

+4

FOSUSerBundle Symfony4 . . .

+3

If you want to use FOSUserBundle with Symfony4, you can try the Ryan patch provided here .

0
source

Source: https://habr.com/ru/post/1690892/


All Articles