From c04dd8d8caf1950563a042da3d395f89532ba3d2 Mon Sep 17 00:00:00 2001 From: Jan Lam Date: Mon, 28 Nov 2022 09:44:07 +0100 Subject: [PATCH] Replace reference to deprecated getUsername method --- composer.json | 4 ++-- src/Services/Blamable/DefaultBlamableProvider.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/composer.json b/composer.json index 524e263..f0ca2b1 100644 --- a/composer.json +++ b/composer.json @@ -16,8 +16,8 @@ "hostnet/entity-blamable-component": "^1.0.4", "hostnet/phpcs-tool": "^9.1.0", "phpunit/phpunit": "^9.5.6", - "symfony/framework-bundle": "^4.4||^5.0", - "symfony/security-bundle": "^4.4||^5.0" + "symfony/framework-bundle": "^5.4.3", + "symfony/security-bundle": "^5.4.3" }, "suggest": { "hostnet/entity-blamable-component": "Provides the @Blamable annotation and listeners", diff --git a/src/Services/Blamable/DefaultBlamableProvider.php b/src/Services/Blamable/DefaultBlamableProvider.php index 8cfa0f3..36a162d 100644 --- a/src/Services/Blamable/DefaultBlamableProvider.php +++ b/src/Services/Blamable/DefaultBlamableProvider.php @@ -34,7 +34,7 @@ public function __construct(TokenStorageInterface $token_storage, string $userna public function getUpdatedBy(): string { if (($token = $this->token_storage->getToken()) instanceof TokenInterface) { - return $token->getUsername(); + return $token->getUserIdentifier(); } return $this->username;