325e917f5a
A change to `Rails::Application.config_for` in https://github.com/rails/rails/pull/33815 and https://github.com/rails/rails/pull/33882 has altered the behaviour of the returned object in a breaking manner. Before that change, nested hashes returned from `config_for` could be accessed using non-symbol keys. After the change, all keys are recursively symbolized so non-symbol access fails to read the expected values. This is a breaking change for any app that might be relying on the nested hashes returned from `config_for` calls, and thus should be deprecated before being removed from the codebase. This commit introduces a temporary `NonSymbolAccessDeprecatedHash` class that recursively wraps any nested hashes inside the `OrderedOptions` object returned from `config_for` and issues a deprecation notice when a non-symbol based access is performed. This way, apps that are still relying on the ability to access these nested hashes using non-symbol keys will be able to observe the deprecation notices and have time to implement changes before non-symbol access is removed for good. A CHANGELOG entry is also added to note that non-symbol access to nested `config_for` hashes is deprecated. |
||
---|---|---|
.. | ||
configuration | ||
initializers | ||
middleware | ||
rack | ||
rake | ||
asset_debugging_test.rb | ||
assets_test.rb | ||
bin_setup_test.rb | ||
configuration_test.rb | ||
console_test.rb | ||
content_security_policy_test.rb | ||
credentials_test.rb | ||
current_attributes_integration_test.rb | ||
dbconsole_test.rb | ||
generators_test.rb | ||
help_test.rb | ||
integration_test_case_test.rb | ||
loading_test.rb | ||
mailer_previews_test.rb | ||
middleware_test.rb | ||
multiple_applications_test.rb | ||
paths_test.rb | ||
per_request_digest_cache_test.rb | ||
rackup_test.rb | ||
rake_test.rb | ||
rendering_test.rb | ||
routing_test.rb | ||
runner_test.rb | ||
server_test.rb | ||
test_runner_test.rb | ||
test_test.rb | ||
url_generation_test.rb | ||
version_test.rb |