aboutsummaryrefslogtreecommitdiffstats
path: root/railties/CHANGELOG.md
diff options
context:
space:
mode:
authorUfuk Kayserilioglu <ufuk@paralaus.com>2019-02-08 19:44:43 +0200
committerGannon McGibbon <gannon.mcgibbon@gmail.com>2019-02-11 14:12:10 -0500
commit325e917f5a5953e8125f4e6531ec28f0565954fd (patch)
tree38f795c8c3197a98be4b8ff0b5265ee784b64a17 /railties/CHANGELOG.md
parent1bbf08bb497a022f94c7309e0525071b1a65e272 (diff)
downloadrails-325e917f5a5953e8125f4e6531ec28f0565954fd.tar.gz
rails-325e917f5a5953e8125f4e6531ec28f0565954fd.tar.bz2
rails-325e917f5a5953e8125f4e6531ec28f0565954fd.zip
Allow deprecated non-symbol access to nested `config_for` hashes
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.
Diffstat (limited to 'railties/CHANGELOG.md')
-rw-r--r--railties/CHANGELOG.md5
1 files changed, 5 insertions, 0 deletions
diff --git a/railties/CHANGELOG.md b/railties/CHANGELOG.md
index 19f4de8a1d..d66add2ca0 100644
--- a/railties/CHANGELOG.md
+++ b/railties/CHANGELOG.md
@@ -1,3 +1,8 @@
+* Fix non-symbol access to nested hashes returned from `Rails::Application.config_for`
+ being broken by allowing non-symbol access with a deprecation notice.
+
+ *Ufuk Kayserilioglu*
+
* Fix deeply nested namespace command printing.
*Gannon McGibbon*