summaryrefslogtreecommitdiff
path: root/config/initializers/deprecations.rb
blob: 3d03efe67e0f1a9f94eaa08cc3bf07a5f6ee26b6 (plain)
1
2
3
4
5
6
7
8
9
10
11
# frozen_string_literal: true

if Rails.env.development? || ENV['GITLAB_LEGACY_PATH_LOG_MESSAGE']
  deprecator = ActiveSupport::Deprecation.new('11.0', 'GitLab')

  deprecator.behavior = -> (message, callstack) {
    Gitlab::AppLogger.warn("#{message}: #{callstack[1..20].join}")
  }

  ActiveSupport::Deprecation.deprecate_methods(Gitlab::GitalyClient::StorageSettings, :legacy_disk_path, deprecator: deprecator)
end