From 7290b68cc3380e87b0741aa33fc9da2d10b8cec0 Mon Sep 17 00:00:00 2001 From: Stephen Vickers Date: Fri, 30 Aug 2024 10:47:34 +0100 Subject: [PATCH] Add deprecation log messages --- src/Jwt/FirebaseClient.php | 2 ++ src/Jwt/WebTokenClient.php | 2 ++ src/Service/LineItem.php | 2 ++ 3 files changed, 6 insertions(+) diff --git a/src/Jwt/FirebaseClient.php b/src/Jwt/FirebaseClient.php index 1aba38b..0dfec2c 100644 --- a/src/Jwt/FirebaseClient.php +++ b/src/Jwt/FirebaseClient.php @@ -243,6 +243,8 @@ public static function getLastPayload(): array|object|null */ public function verify(?string $publicKey, ?string $jku = null): bool { + Util::logDebug('Method ceLTIc\LTI\Jwt\FirebaseClient->verify has been deprecated; please use ceLTIc\LTI\Jwt\FirebaseClient->verifySignature instead.', + true); return $this->verifySignature($publicKey, $jku); } diff --git a/src/Jwt/WebTokenClient.php b/src/Jwt/WebTokenClient.php index 209c476..ba9633e 100644 --- a/src/Jwt/WebTokenClient.php +++ b/src/Jwt/WebTokenClient.php @@ -274,6 +274,8 @@ public static function getLastPayload(): array|object|null */ public function verify(?string $publicKey, ?string $jku = null): bool { + Util::logDebug('Method ceLTIc\LTI\Jwt\WebTokenClient->verify has been deprecated; please use ceLTIc\LTI\Jwt\WebTokenClient->verifySignature instead.', + true); return $this->verifySignature($publicKey, $jku); } diff --git a/src/Service/LineItem.php b/src/Service/LineItem.php index 8319fda..e3b0faa 100644 --- a/src/Service/LineItem.php +++ b/src/Service/LineItem.php @@ -249,6 +249,8 @@ public function get(): LTI\LineItem|bool */ public static function getLineItem(Platform $platform, string $endpoint): LTI\LineItem|bool { + Util::logDebug('Method ceLTIc\LTI\Service\LineItem::getLineItem has been deprecated; please use ceLTIc\LTI\LineItem::fromEndpoint or ceLTIc\LTI\Service\LineItem->get instead.', + true); return LTI\LineItem::fromEndpoint($platform, $endpoint); }