From b9a125c3beb2577e14ac52c4add029622a7ea222 Mon Sep 17 00:00:00 2001 From: Klaus Zanders Date: Fri, 20 Mar 2026 11:44:29 +0100 Subject: [PATCH] Get rid of deprecation warnings when starting the application --- config/application.rb | 7 ------- config/initializers/carrierwave.rb | 1 - config/initializers/new_framework_defaults_7_0.rb | 3 ++- config/initializers/new_framework_defaults_8_1.rb | 3 +-- 4 files changed, 3 insertions(+), 11 deletions(-) diff --git a/config/application.rb b/config/application.rb index 4d09345e1b2..9b23c86aac0 100644 --- a/config/application.rb +++ b/config/application.rb @@ -167,13 +167,6 @@ module OpenProject # Include tstzrange columns in the list of time zone aware types ActiveRecord::Base.time_zone_aware_types += [:tstzrange] - # Specifies whether `to_time` methods preserve the UTC offset of their receivers - # or preserves the timezone. Rails 8.0+ default is `:zone`. - # If set to `:zone`, `to_time` methods will use the timezone of their receivers. - # If set to `:offset`, `to_time` methods will use the UTC offset. - # If `false`, `to_time` methods will convert to the local system UTC offset instead. - config.active_support.to_time_preserves_timezone = :zone - # Activate being able to specify the format in which full_message works. # Doing this, it is e.g. possible to avoid having the format of '%{attribute} %{message}' which # will always prepend the attribute name to the error message. diff --git a/config/initializers/carrierwave.rb b/config/initializers/carrierwave.rb index e6e4b85f366..bfc6615c3fe 100644 --- a/config/initializers/carrierwave.rb +++ b/config/initializers/carrierwave.rb @@ -45,7 +45,6 @@ module CarrierWave end CarrierWave.configure do |config| - config.fog_provider = "fog/aws" config.fog_credentials = credentials config.fog_directory = directory config.fog_public = public diff --git a/config/initializers/new_framework_defaults_7_0.rb b/config/initializers/new_framework_defaults_7_0.rb index 7d86bd53802..dcdb700b352 100644 --- a/config/initializers/new_framework_defaults_7_0.rb +++ b/config/initializers/new_framework_defaults_7_0.rb @@ -116,7 +116,8 @@ Rails.application.config.active_record.partial_inserts = false # https://guides.rubyonrails.org/configuring.html#config-action-controller-raise-on-open-redirects # Protect from open redirect attacks in `redirect_back_or_to` and `redirect_to`. # Previous versions had false. Rails 7.0+ default is true. -Rails.application.config.action_controller.raise_on_open_redirects = true +# `raise_on_open_redirects` is deprecated in Rails 8.2; use `action_on_open_redirect` instead. +Rails.application.config.action_controller.action_on_open_redirect = :raise # https://guides.rubyonrails.org/configuring.html#config-active-storage-variant-processor # Change the variant processor for Active Storage. diff --git a/config/initializers/new_framework_defaults_8_1.rb b/config/initializers/new_framework_defaults_8_1.rb index af849867498..079c41c4553 100644 --- a/config/initializers/new_framework_defaults_8_1.rb +++ b/config/initializers/new_framework_defaults_8_1.rb @@ -29,8 +29,7 @@ #++ # OpenProject should not be affected by this change. At least the vast majority of JSON responses # are rendered in the APIv3 which do not use the JSON renderer of ActionController. -# But keeping it set to true does not cost anything. -Rails.configuration.action_controller.escape_json_responses = true +Rails.configuration.action_controller.escape_json_responses = false ### # Skips escaping LINE SEPARATOR (U+2028) and PARAGRAPH SEPARATOR (U+2029) in JSON.