From 31fbe66af859582a20b803f38be96be8accdf2c3 Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Mon, 3 Feb 2025 18:35:30 +0100 Subject: [PATCH] [Security] Improve BC-layer to deprecate eraseCredentials methods --- .../TestLegacyPasswordAuthenticatedUser.php | 3 +-- Tests/Hasher/PasswordHasherFactoryTest.php | 16 ---------------- 2 files changed, 1 insertion(+), 18 deletions(-) diff --git a/Tests/Fixtures/TestLegacyPasswordAuthenticatedUser.php b/Tests/Fixtures/TestLegacyPasswordAuthenticatedUser.php index 6a9b4ea..ef867fa 100644 --- a/Tests/Fixtures/TestLegacyPasswordAuthenticatedUser.php +++ b/Tests/Fixtures/TestLegacyPasswordAuthenticatedUser.php @@ -35,10 +35,9 @@ public function getRoles(): array return $this->roles; } + #[\Deprecated] public function eraseCredentials(): void { - // Do nothing - return; } public function getUserIdentifier(): string diff --git a/Tests/Hasher/PasswordHasherFactoryTest.php b/Tests/Hasher/PasswordHasherFactoryTest.php index 33ac3e5..d49ca8d 100644 --- a/Tests/Hasher/PasswordHasherFactoryTest.php +++ b/Tests/Hasher/PasswordHasherFactoryTest.php @@ -238,25 +238,9 @@ public function testMigrateFromWithCustomInstance() class SomeUser implements PasswordAuthenticatedUserInterface { - public function getRoles(): array - { - } - public function getPassword(): ?string { } - - public function getSalt(): ?string - { - } - - public function getUserIdentifier(): string - { - } - - public function eraseCredentials() - { - } } class SomeChildUser extends SomeUser