Skip to content

Commit ef84830

Browse files
Merge pull request rails#46457 from jonathanhefner/guide-configuring-update-deprecation-sections
Update deprecation-related config descriptions [ci-skip]
2 parents e6ab288 + cacb4ac commit ef84830

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

guides/source/configuring.md

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2031,19 +2031,25 @@ The default value depends on the `config.load_defaults` target version:
20312031
20322032
#### `config.active_support.deprecation`
20332033
2034-
Configures the behavior of deprecation warnings. The options are `:raise`, `:stderr`, `:log`, `:notify`, or `:silence`. The default is `:stderr`.
2034+
Configures the behavior of deprecation warnings. The options are `:raise`, `:stderr`, `:log`, `:notify`, and `:silence`.
2035+
2036+
In the default generated `config/environments` files, this is set to `:log` for development and `:stderr` for test, and it is omitted for production in favor of [`config.active_support.report_deprecations`](#config-active-support-report-deprecations).
20352037
20362038
#### `config.active_support.disallowed_deprecation`
20372039
2038-
Configures the behavior of disallowed deprecation warnings. The options are `:raise`, `:stderr`, `:log`, `:notify`, or `:silence`. The default is `:raise`.
2040+
Configures the behavior of disallowed deprecation warnings. The options are `:raise`, `:stderr`, `:log`, `:notify`, and `:silence`.
2041+
2042+
In the default generated `config/environments` files, this is set to `:raise` for both development and test, and it is omitted for production in favor of [`config.active_support.report_deprecations`](#config-active-support-report-deprecations).
20392043
20402044
#### `config.active_support.disallowed_deprecation_warnings`
20412045
20422046
Configures deprecation warnings that the Application considers disallowed. This allows, for example, specific deprecations to be treated as hard failures.
20432047
20442048
#### `config.active_support.report_deprecations`
20452049
2046-
Allows you to disable all deprecation warnings (including disallowed deprecations); it makes `ActiveSupport::Deprecation.warn` a no-op. This is enabled by default in production.
2050+
When `false`, disables all deprecation warnings, including disallowed deprecations, making `ActiveSupport::Deprecation.warn` a no-op.
2051+
2052+
In the default generated `config/environments` files, this is set to `false` for production.
20472053
20482054
#### `config.active_support.remove_deprecated_time_with_zone_name`
20492055
@@ -3042,7 +3048,7 @@ Below is a comprehensive list of all the initializers found in Rails in the orde
30423048

30433049
* `i18n.callbacks`: In the development environment, sets up a `to_prepare` callback which will call `I18n.reload!` if any of the locales have changed since the last request. In production this callback will only run on the first request.
30443050

3045-
* `active_support.deprecation_behavior`: Sets up deprecation reporting for environments, defaulting to `:log` for development, `:silence` for production, and `:stderr` for test. Can be set to an array of values. This initializer also sets up behaviors for disallowed deprecations, defaulting to `:raise` for development and test and `:silence` for production. Disallowed deprecation warnings default to an empty array.
3051+
* `active_support.deprecation_behavior`: Sets up deprecation reporting behavior for [`Rails.application.deprecators`][] based on [`config.active_support.report_deprecations`](#config-active-support-report-deprecations), [`config.active_support.deprecation`](#config-active-support-deprecation), [`config.active_support.disallowed_deprecation`](#config-active-support-disallowed-deprecation), and [`config.active_support.disallowed_deprecation_warnings`](#config-active-support-disallowed-deprecation-warnings).
30463052

30473053
* `active_support.initialize_time_zone`: Sets the default time zone for the application based on the `config.time_zone` setting, which defaults to "UTC".
30483054

@@ -3133,6 +3139,8 @@ Below is a comprehensive list of all the initializers found in Rails in the orde
31333139

31343140
* `disable_dependency_loading`: Disables the automatic dependency loading if the `config.eager_load` is set to `true`.
31353141

3142+
[`Rails.application.deprecators`]: https://api.rubyonrails.org/classes/Rails/Application.html#method-i-deprecators
3143+
31363144
Database Pooling
31373145
----------------
31383146

0 commit comments

Comments
 (0)