diff --git a/CHANGES.txt b/CHANGES.txt index 33219edd..be40f790 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,5 +1,8 @@ CHANGES +8.7.0 (Aug 1, 2025) +- Added support for feature flag prerequisites. This allows customers to define dependency conditions between flags, which are evaluated before any allowlists or targeting rules. + 8.6.0 (Jun 17, 2025) - Added support for rule-based segments. These segments determine membership at runtime by evaluating their configured rules against the user attributes provided to the SDK. - Added support for feature flag prerequisites. This allows customers to define dependency conditions between flags, which are evaluated before any allowlists or targeting rules. diff --git a/lib/splitclient-rb/clients/split_client.rb b/lib/splitclient-rb/clients/split_client.rb index 523c5d0d..4979bede 100644 --- a/lib/splitclient-rb/clients/split_client.rb +++ b/lib/splitclient-rb/clients/split_client.rb @@ -38,6 +38,8 @@ def get_treatment( key, split_name, attributes = {}, evaluation_options = nil, split_data = nil, store_impressions = true, multiple = false, evaluator = nil ) + log_deprecated_warning(GET_TREATMENT, evaluator, 'evaluator') + result = treatment(key, split_name, attributes, split_data, store_impressions, GET_TREATMENT, multiple, evaluation_options) return result.tap { |t| t.delete(:config) } if multiple result[:treatment] @@ -47,6 +49,7 @@ def get_treatment_with_config( key, split_name, attributes = {}, evaluation_options = nil, split_data = nil, store_impressions = true, multiple = false, evaluator = nil ) + log_deprecated_warning(GET_TREATMENT, evaluator, 'evaluator') treatment(key, split_name, attributes, split_data, store_impressions, GET_TREATMENT_WITH_CONFIG, multiple, evaluation_options) end @@ -332,6 +335,10 @@ def treatments(key, feature_flag_names, attributes = {}, evaluation_options = ni # @return [String/Hash] Treatment as String or Hash of treatments in case of array of features def treatment(key, feature_flag_name, attributes = {}, split_data = nil, store_impressions = true, calling_method = 'get_treatment', multiple = false, evaluation_options = nil) + + log_deprecated_warning(calling_method, split_data, 'split_data') + log_deprecated_warning(calling_method, store_impressions'store_impressions') + impressions = [] bucketing_key, matching_key = keys_from_key(key) @@ -355,6 +362,10 @@ def treatment(key, feature_flag_name, attributes = {}, split_data = nil, store_i treatments end + def log_deprecated_warning(calling_method, parameter, parameter_name) + @config.logger.warn("#{calling_method}: detected #{parameter_name} parameter used, this parameter is deprecated and its value is ignored.") unless parameter.nil? + end + def evaluate_treatment(feature_flag, feature_flag_name, bucketing_key, matching_key, attributes, calling_method, multiple = false, evaluation_options = nil) impressions_decorator = [] begin diff --git a/lib/splitclient-rb/version.rb b/lib/splitclient-rb/version.rb index d0431b85..c34677cc 100644 --- a/lib/splitclient-rb/version.rb +++ b/lib/splitclient-rb/version.rb @@ -1,3 +1,3 @@ module SplitIoClient - VERSION = '8.6.0' + VERSION = '8.7.0' end