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

adapt deprecation method calls

ulferts14c8ae1bf5f2
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb
index 9f486f37550..1a1ad14f73d 100644
--- a/app/helpers/application_helper.rb
+++ b/app/helpers/application_helper.rb
@@ -396,7 +396,7 @@ module ApplicationHelper
def calendar_for(*_args)
ActiveSupport::Deprecation.new.warn(
"calendar_for has been removed. Please use the opce-basic-single-date-picker angular component instead",
- caller
+ caller_locations
)
end
diff --git a/app/models/setting.rb b/app/models/setting.rb
index eb2be5577fc..520d1e378f7 100644
--- a/app/models/setting.rb
+++ b/app/models/setting.rb
@@ -93,7 +93,7 @@ class Setting < ApplicationRecord
definition = Settings::Definition[:#{name}]
if definition.format != :boolean
- ActiveSupport::Deprecation.new.warn "Calling #{self}.#{name}? is deprecated since it is not a boolean", caller
+ ActiveSupport::Deprecation.new.warn "Calling #{self}.#{name}? is deprecated since it is not a boolean", caller_locations
end
value = self[:#{name}]
diff --git a/lib/open_project/omni_auth/authorization.rb b/lib/open_project/omni_auth/authorization.rb
index 7848ead8c01..ea17627ace4 100644
--- a/lib/open_project/omni_auth/authorization.rb
+++ b/lib/open_project/omni_auth/authorization.rb
@@ -110,7 +110,7 @@ module OpenProject
ActiveSupport::Deprecation.new.warn(
"after_login does not return the actually logged in user and has been deprecated. " \
"Please use OpenProject::Hook omniauth_user_authorized or user_logged_in hooks instead",
- caller
+ caller_locations
)
add_after_login_callback AfterLoginBlockCallback.new(&)
end
diff --git a/lib_static/open_project/configuration.rb b/lib_static/open_project/configuration.rb
index fe17865ed3d..44fef6709dc 100644
--- a/lib_static/open_project/configuration.rb
+++ b/lib_static/open_project/configuration.rb
@@ -134,7 +134,7 @@ module OpenProject
define_singleton_method :"#{definition.name}?" do
if definition.format != :boolean
ActiveSupport::Deprecation.new.warn "Calling #{self}.#{definition.name}? is deprecated since it is not a boolean",
- caller
+ caller_locations
end
TRUE_VALUES.include? self[definition.name]
end
diff --git a/lib_static/open_project/database.rb b/lib_static/open_project/database.rb
index 83c83ae8cae..6f6e36e460f 100644
--- a/lib_static/open_project/database.rb
+++ b/lib_static/open_project/database.rb
@@ -160,7 +160,7 @@ module OpenProject
def self.mysql?(_arg = nil)
message = ".mysql? is no longer supported and will always return false. Remove the call."
- ActiveSupport::Deprecation.new.warn message, caller
+ ActiveSupport::Deprecation.new.warn message, caller_locations
false
end