Open pawaclawczyk opened 10 years ago
UserEquatableInterfaceFixer - fixes occurance of method in classes directly extending UserInterface
.
We should support here case when UserInterface
is aliased in a use
statement.
Worth of thinking is approach to instantiate a class and check implementing of interface via instanceof
.
Symfony\Component\Security\Core\User\UserInterface::equals()
has moved toSymfony\Component\Security\Core\User\EquatableInterface::isEqualTo()
.You must rename the
equals()
method in your implementation of theUser
class toisEqualTo()
and implementEquatableInterface
. Apart from that, no other changes are required.Alternatively, you may use the default implementation provided by
AbstractToken::hasUserChanged()
if you have no need of custom comparison logic. In this case, do not implementEquatableInterface
and remove your comparison method.Before:
After: