-
-
Notifications
You must be signed in to change notification settings - Fork 484
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add commands from FOSUserBundle #1484
Add commands from FOSUserBundle #1484
Conversation
fff2d68
to
573b7e0
Compare
573b7e0
to
69026bb
Compare
69026bb
to
ec3444c
Compare
3bdabf7
to
5328f0c
Compare
8a308fe
to
3700471
Compare
3700471
to
fe296be
Compare
277a7de
to
12c182c
Compare
30cfbd2
to
a048a91
Compare
|
||
$user = $this->refreshUser($user); | ||
|
||
// static::assertSame($user->getPassword(), 'new_password'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The password is not really changed.
That's because the plainPassword field is not managed by Doctrine, so if we only modify this it is unable to know something changed and trigger the preUpdate lifecycle event.
On FOSUserBundle , the UserManager "save" method does not only save the object but also updated the canonical fields and the password. Should we do the same?
It will also affect the UserAdmin when you only change password, so we should do the same there.
wdyt @VincentLanglet ? At the end we have some duplicated things. The preUpdate event and the code on the manager and the admin.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed by adding the updatePassword to the ModelManager, not sure if I like it a lot but it works.
<files psalm-version="4.19.0@a2ad69ae4f5ab1f7d225a8dc4e2ec2d9415ed599"> | ||
<file src="src/Action/LoginAction.php"> | ||
<UndefinedInterfaceMethod occurrences="1"> | ||
<code>getFlashBag</code> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Soon, it won't be needed psalm/psalm-plugin-symfony#242 ;)
Lets add this now, to not block other Prs |
Subject
I am targeting this branch, because here is where commands are not present because of removal of FOSUserBundle.
Part of #1465
Changelog