Fosuserbundle: Will this bundle support future symfony version (5) or is this project stopped?

Created on 1 Mar 2021  路  9Comments  路  Source: FriendsOfSymfony/FOSUserBundle

Is this bundle abandoned or there is a future plan to support Symfony 5?

Most helpful comment

My plan is to update the bundle to support Symfony 5 when I have time for that (no ETA for when that actually happens though) but declare the bundle as being in maintenance mode only. The focus would only be on allowing existing projects to migrate to Symfony 5 without being blocked.

New projects should not use this bundle. It is actually much easier to implement the User entity in the project (allowing to fit exactly the need of the project). Regarding the extra features of the bundle:

  • the EntityUserProvider of Symfony already provides the UserProvider when using the Doctrine ORM (and other object managers integrated with Symfony have an equivalent feature)
  • change password is easy to implement in the project. That's a simple form relying on core Symfony features (the validator for the current password is in core since years)
  • email verification is provided by https://github.com/SymfonyCasts/verify-email-bundle
  • password reset is provided by https://github.com/SymfonyCasts/reset-password-bundle
  • registration is easier to implement in the project directly to fit the need of the project, especially when the User entity is in the project. symfony/form already provides everything you need
  • the ProfileController showing a profile page for the user is better done in projects needing it, as the content is likely not enough anyway
  • groups are something I consider legacy since years already. This is easier solved either by using the role hierarchy or by using your own solution with custom voters, rather than relying on groups to inherit roles.

All 9 comments

My plan is to update the bundle to support Symfony 5 when I have time for that (no ETA for when that actually happens though) but declare the bundle as being in maintenance mode only. The focus would only be on allowing existing projects to migrate to Symfony 5 without being blocked.

New projects should not use this bundle. It is actually much easier to implement the User entity in the project (allowing to fit exactly the need of the project). Regarding the extra features of the bundle:

  • the EntityUserProvider of Symfony already provides the UserProvider when using the Doctrine ORM (and other object managers integrated with Symfony have an equivalent feature)
  • change password is easy to implement in the project. That's a simple form relying on core Symfony features (the validator for the current password is in core since years)
  • email verification is provided by https://github.com/SymfonyCasts/verify-email-bundle
  • password reset is provided by https://github.com/SymfonyCasts/reset-password-bundle
  • registration is easier to implement in the project directly to fit the need of the project, especially when the User entity is in the project. symfony/form already provides everything you need
  • the ProfileController showing a profile page for the user is better done in projects needing it, as the content is likely not enough anyway
  • groups are something I consider legacy since years already. This is easier solved either by using the role hierarchy or by using your own solution with custom voters, rather than relying on groups to inherit roles.

@akilshadi there is NucleosUserBundle which looks promising.
It's compatible with Symfony 5, and offers more or less the same features.

@alexsegura the reset password feature of https://github.com/SymfonyCasts/reset-password-bundle is implemented in a stronger way, which is why that's my suggested replacement instead.

@stof yes, but now that I have finally decided to upgrade to Symfony 5.x (yeah, I'm late to the party), FOSUserBundle is one of the main blockers. So I prefer to switch first to NucleosUserBundle, then upgrade Symfony to 5.x, and after that I will take a look at your recommendations 馃檪

@alexsegura How did the migration from FOSUserBundle to NucleosUserBundle go? Is it successfull?

@netandreus it's used in production without problems.
You can check the diff here coopcycle/coopcycle-web#2238

Maybe also @core23 can tell?

@alexsegura How did the migration from FOSUserBundle to NucleosUserBundle go? Is it successfull?

It depends how much customization do you have. If you're just using the registration and auth part, you can use the migration guide and update your project within minutes

Maybe this could even be managed with rector 馃槷

Never created a custom script for rector, feel free to help @alexsegura

https://github.com/nucleos/NucleosUserBundle/issues/357

Was this page helpful?
0 / 5 - 0 ratings