Skip to content

Commit 5a5c724

Browse files
committed
Added deprecate warn and updated version and changes
1 parent f122208 commit 5a5c724

File tree

3 files changed

+15
-1
lines changed

3 files changed

+15
-1
lines changed

CHANGES.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
CHANGES
22

3+
8.7.0 (Aug 1, 2025)
4+
- Added support for feature flag prerequisites. This allows customers to define dependency conditions between flags, which are evaluated before any allowlists or targeting rules.
5+
36
8.6.0 (Jun 17, 2025)
47
- 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.
58
- Added support for feature flag prerequisites. This allows customers to define dependency conditions between flags, which are evaluated before any allowlists or targeting rules.

lib/splitclient-rb/clients/split_client.rb

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ def get_treatment(
3838
key, split_name, attributes = {}, evaluation_options = nil, split_data = nil, store_impressions = true,
3939
multiple = false, evaluator = nil
4040
)
41+
log_deprecated_warning(GET_TREATMENT, evaluator, 'evaluator')
42+
4143
result = treatment(key, split_name, attributes, split_data, store_impressions, GET_TREATMENT, multiple, evaluation_options)
4244
return result.tap { |t| t.delete(:config) } if multiple
4345
result[:treatment]
@@ -47,6 +49,7 @@ def get_treatment_with_config(
4749
key, split_name, attributes = {}, evaluation_options = nil, split_data = nil, store_impressions = true,
4850
multiple = false, evaluator = nil
4951
)
52+
log_deprecated_warning(GET_TREATMENT, evaluator, 'evaluator')
5053
treatment(key, split_name, attributes, split_data, store_impressions, GET_TREATMENT_WITH_CONFIG, multiple, evaluation_options)
5154
end
5255

@@ -332,6 +335,10 @@ def treatments(key, feature_flag_names, attributes = {}, evaluation_options = ni
332335
# @return [String/Hash] Treatment as String or Hash of treatments in case of array of features
333336
def treatment(key, feature_flag_name, attributes = {}, split_data = nil, store_impressions = true,
334337
calling_method = 'get_treatment', multiple = false, evaluation_options = nil)
338+
339+
log_deprecated_warning(calling_method, split_data, 'split_data')
340+
log_deprecated_warning(calling_method, store_impressions'store_impressions')
341+
335342
impressions = []
336343
bucketing_key, matching_key = keys_from_key(key)
337344

@@ -355,6 +362,10 @@ def treatment(key, feature_flag_name, attributes = {}, split_data = nil, store_i
355362
treatments
356363
end
357364

365+
def log_deprecated_warning(calling_method, parameter, parameter_name)
366+
@config.logger.warn("#{calling_method}: detected #{parameter_name} parameter used, this parameter is deprecated and its value is ignored.") unless parameter.nil?
367+
end
368+
358369
def evaluate_treatment(feature_flag, feature_flag_name, bucketing_key, matching_key, attributes, calling_method, multiple = false, evaluation_options = nil)
359370
impressions_decorator = []
360371
begin

lib/splitclient-rb/version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
module SplitIoClient
2-
VERSION = '8.6.0'
2+
VERSION = '8.7.0'
33
end

0 commit comments

Comments
 (0)