From 504dc5142ee96bff21a50c74f27b2f7b2ceb61fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=B4me=20Chilliet?= Date: Wed, 11 Mar 2026 14:43:50 +0100 Subject: [PATCH] =?UTF-8?q?chore:=20Un-deprecate=20IControllerMethodReflec?= =?UTF-8?q?tor=20as=20it=E2=80=99s=20now=20useful=20for=20attributes=20as?= =?UTF-8?q?=20well?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It should be extended later to add methods to get attributes from reflection, and maybe a getter to the reflectionMethod object to avoid middlewares building their own. Signed-off-by: Côme Chilliet --- .../Utility/IControllerMethodReflector.php | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/lib/public/AppFramework/Utility/IControllerMethodReflector.php b/lib/public/AppFramework/Utility/IControllerMethodReflector.php index 480b4a3576c..d4e36e310e0 100644 --- a/lib/public/AppFramework/Utility/IControllerMethodReflector.php +++ b/lib/public/AppFramework/Utility/IControllerMethodReflector.php @@ -11,22 +11,13 @@ namespace OCP\AppFramework\Utility; /** * Interface ControllerMethodReflector * - * Reads and parses annotations from doc comments + * You can inject this interface in your Middleware, and it will be prefilled with information related to the called controller method + * + * Reads and parses annotations from doc comments (deprecated) and PHP attributes * * @since 8.0.0 - * @deprecated 22.0.0 will be obsolete with native attributes in PHP8 - * @see https://help.nextcloud.com/t/how-should-we-use-php8-attributes/104278 */ interface IControllerMethodReflector { - /** - * @param object $object an object or classname - * @param string $method the method which we want to inspect - * @return void - * @since 8.0.0 - * @deprecated 17.0.0 Reflect should not be called multiple times and only be used internally. This will be removed in Nextcloud 18 - */ - public function reflect($object, string $method); - /** * Inspects the PHPDoc parameters for types *