Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

deprecate method Setting.register_callback

Christophe Bliard4311a0cecb33
diff --git a/app/models/setting/callbacks_helper.rb b/app/models/setting/callbacks_helper.rb
index bdd677a97f0..985f03ffe81 100644
--- a/app/models/setting/callbacks_helper.rb
+++ b/app/models/setting/callbacks_helper.rb
@@ -35,6 +35,9 @@ class Setting
# register the block with the underlying notifications system
notifier.subscribe(notification_event_for(name), &callback)
end
+ # register_callback is not used anymore in our code
+ # it can be removed along with fire_callbacks in next major version
+ OpenProject::Deprecation.deprecate_method(self, :register_callback)
# instructs the underlying notifications system to publish all setting events for setting #name
# based on the new and old setting objects different events can be triggered