diff options
author | Arthur Schiwon <blizzz@arthur-schiwon.de> | 2024-11-12 22:15:08 +0100 |
---|---|---|
committer | backportbot[bot] <backportbot[bot]@users.noreply.github.com> | 2024-11-13 06:29:31 +0000 |
commit | b45dc98ba152c16d348e098a8ae0f764c39df307 (patch) | |
tree | 24aabdc7f99c2e427d42c59b9f36b0bb144d57d6 | |
parent | 0da87f178f1db975a1c3f9212b99ac01f4bae874 (diff) | |
download | nextcloud-server-b45dc98ba152c16d348e098a8ae0f764c39df307.tar.gz nextcloud-server-b45dc98ba152c16d348e098a8ae0f764c39df307.zip |
fix(Middleware): log deprecation when annotation was actually usedbackport/49237/stable30
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
-rw-r--r-- | lib/private/AppFramework/Middleware/Security/CORSMiddleware.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/private/AppFramework/Middleware/Security/CORSMiddleware.php b/lib/private/AppFramework/Middleware/Security/CORSMiddleware.php index 3f0755b1b91..6240be7852e 100644 --- a/lib/private/AppFramework/Middleware/Security/CORSMiddleware.php +++ b/lib/private/AppFramework/Middleware/Security/CORSMiddleware.php @@ -101,12 +101,12 @@ class CORSMiddleware extends Middleware { */ protected function hasAnnotationOrAttribute(ReflectionMethod $reflectionMethod, string $annotationName, string $attributeClass): bool { if ($this->reflector->hasAnnotation($annotationName)) { + $this->logger->debug($reflectionMethod->getDeclaringClass()->getName() . '::' . $reflectionMethod->getName() . ' uses the @' . $annotationName . ' annotation and should use the #[' . $attributeClass . '] attribute instead'); return true; } if (!empty($reflectionMethod->getAttributes($attributeClass))) { - $this->logger->debug($reflectionMethod->getDeclaringClass()->getName() . '::' . $reflectionMethod->getName() . ' uses the @' . $annotationName . ' annotation and should use the #[' . $attributeClass . '] attribute instead'); return true; } |