UserEvent.php
533 Bytes
-
Remove FOSUserBundle and SonataUserBundle · 1b851678
Neither bundle supports recent Symfony versions. Their features are reimplemented in the application, keeping the existing behavior: - User and Usergroup no longer extend the bundles' models: the mapped fields are moved to UserAccountTrait and UserProfileTrait with an identical mapping (no schema change), validation rules included. - App\Security\User: user manager, provider (username or email), programmatic login, password reset mailer, token generator. A Doctrine listener keeps canonical fields and password hash up to date on every persist, like FOSUserBundle did. - Login, profile, password change/reset and registration controllers keep the fos_user_* route names, paths and form names, so templates are unchanged. FOS templates are served from the @FOSUser namespace and FOS translations are kept with a lower priority. - The user and group admins keep their "sonata.user.admin.*" codes, so the ROLE_SONATA_USER_ADMIN_* roles stored in database still apply. The roles widget is copied from SonataUserBundle. - The SonataUserBundle admin login pages are dropped: /admin/login and /admin/resetting/request redirect to the front pages. Add UserAccountTest covering login, password reset and change, and user creation in the admin; it passes on both the old and new code.
Damien Moulard authored
×