public function upgradePassword(PasswordAuthenticatedUserInterface
$user, string
$newHashedPassword): void
{ $class =
$this->
getClass();
if (!
$user instanceof
$class) { throw new UnsupportedUserException(sprintf('Instances of "%s" are not supported.',
get_debug_type($user)));
} $repository =
$this->
getRepository();
if ($user instanceof PasswordAuthenticatedUserInterface &&
$repository instanceof PasswordUpgraderInterface
) { $repository->
upgradePassword($user,
$newHashedPassword);
} } private function getObjectManager(): ObjectManager
{ return $this->registry->
getManager($this->managerName
);
} private function getRepository(): ObjectRepository
{ return $this->
getObjectManager()->
getRepository($this->classOrAlias
);
}