Fosuserbundle: Provide documentation for Symfony4

Created on 10 Oct 2018  路  8Comments  路  Source: FriendsOfSymfony/FOSUserBundle

This is feature request.

Symfony 4.x

Currently there is no documentation for Symfony 4.

This issue is an attempt at fixing that.

Documentation

All 8 comments

Could someone put me as an assignee?
Could someone put a label Documentation or give me access to do that myself?

Feel free to open a pull request :)

I've configured successfully the bundle in Symfony 4
the changes needed are

  • On src/Entity/User.php change the namespace form
namespace AppBundle/User;

to

namespace App\Entity;
  • The configuration needs to be in its own file
    Create a new file called config/packages/fos_user_bundle.yml
fos_user:
    db_driver: orm # other valid values are 'mongodb' and 'couchdb'
    firewall_name: main
    user_class: App\Entity\User  # <--- Note the namespace must be App not AppBundle
    from_email:
        address: "%env(MAILER_ADDRESS)%"
        sender_name: "%env(MAILER_SENDER_NAME)%"
  • On security.yml there is a problematic field
    I had the same issue as #2855 so
                user_checker: fos_user.user_checker

needs to be changed to

                user_checker: security.user_checker

seems to work after this change, but I'm not sure this is 100% correct
as @xabbuh points out in the below PR fos_user.user_checker is still defined in security.yml file of the bundle.
https://github.com/FriendsOfSymfony/FOSUserBundle/pull/2867
Also it would be needed to add a new element in the dropdown to point to version 4
image on the Symfony documentation site

Also required:

You've to add the following to the config/packages/framework.yaml:

framework:
    # ... other stuff ...

    templating:
        engines: ['twig', 'php']

_Originally posted by @devtronic in https://github.com/FriendsOfSymfony/FOSUserBundle/issues/2870#issuecomment-441001037_

Right now the Official Symfony website is displaying this warning,
image

One suggestion @XWB, I think that we need to create a 4.x branch and then we can open a pull request with the updated documentation, master and 4.x can be the same, but I suspect that Symfony website convention is to read from version number branch to match their dropdown switcher for versions.
Also, it would be great to have a label for Symfony 4 to group all related issues, specially for newcomers.

Thanks you!

@XWB any update with this? Could you create the branch 4.x as suggested by @alfonsodev ?

It is really necessary for Symfony 4

Was this page helpful?
0 / 5 - 0 ratings

Related issues

hermandinho picture hermandinho  路  4Comments

mirbahar picture mirbahar  路  6Comments

sinner picture sinner  路  3Comments

soullivaneuh picture soullivaneuh  路  6Comments

karimdev picture karimdev  路  4Comments