From 7aa3e154405d2608431039fde8ccc45e3ff72ab7 Mon Sep 17 00:00:00 2001 From: Andrei Prigorshnev Date: Thu, 29 Feb 2024 16:20:48 +0000 Subject: [PATCH] DEV: Deprecate FoundUserWithStatusSerializer (#25883) A followup to b3a11994. --- app/serializers/found_user_with_status_serializer.rb | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/app/serializers/found_user_with_status_serializer.rb b/app/serializers/found_user_with_status_serializer.rb index 5aa95d83512..44601c01221 100644 --- a/app/serializers/found_user_with_status_serializer.rb +++ b/app/serializers/found_user_with_status_serializer.rb @@ -6,5 +6,16 @@ class FoundUserWithStatusSerializer < FoundUserSerializer def initialize(object, options = {}) super options[:include_status] = true + deprecated + end + + private + + def deprecated + message = + "FoundUserWithStatusSerializer is deprecated. " \ + "Use FoundUserSerializer with the include_status option instead." + + Discourse.deprecate(message, since: "3.2.0", drop_from: "3.3.0.beta1") end end