Avoid defining Hash#deep_merge and #deep_merge!#342
Merged
pkuczynski merged 3 commits intorubyconfig:masterfrom Oct 18, 2023
Merged
Avoid defining Hash#deep_merge and #deep_merge!#342pkuczynski merged 3 commits intorubyconfig:masterfrom
Hash#deep_merge and #deep_merge!#342pkuczynski merged 3 commits intorubyconfig:masterfrom
Conversation
Member
|
@cjlarose what do you think? |
pkuczynski
requested changes
Oct 2, 2023
Member
pkuczynski
left a comment
There was a problem hiding this comment.
Could you please update the CHANGELOG as well?
`config` uses `DeepMerge.deep_merge!` instead of `Hash#deep_merge!`, so monkey patching `Hash` is unnecessary. Furthermore, DeepMerge's `Hash` monkey patch is not compatible with Rails 7.1 (see [rails#49457][]). This commit changes `require 'deep_merge'` to `require 'deep_merge/core'` so that DeepMerge's `Hash` monkey patch is no longer loaded. Users who rely on the monkey patch can load it manually via `require 'deep_merge/deep_merge_hash'`. Closes rubyconfig#314. [rails#49457]: rails/rails#49457
6f335b1 to
4a0b7a5
Compare
Contributor
Author
Done! |
Member
|
@jonathanhefner I extended our test suite for Rails 7.x in #344, but test fails with a |
Member
|
#344 got finally merged so we can verify this PR agains Rails 7.x. Let's see if it works. |
Member
|
Looks it works! Merging and releasing... |
pkuczynski
approved these changes
Oct 18, 2023
tvararu
added a commit
to NHSDigital/manage-vaccinations-in-schools
that referenced
this pull request
Oct 19, 2023
config@5.0.0 is compatible with Rails 7.1 rubyconfig/config#342
tvararu
added a commit
to NHSDigital/manage-vaccinations-in-schools
that referenced
this pull request
Oct 19, 2023
config@5.0.0 is compatible with Rails 7.1 rubyconfig/config#342
tvararu
added a commit
to NHSDigital/manage-vaccinations-in-schools
that referenced
this pull request
Oct 19, 2023
config@5.0.0 is compatible with Rails 7.1 rubyconfig/config#342
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
configusesDeepMerge.deep_merge!instead ofHash#deep_merge!, so monkey patchingHashis unnecessary. Furthermore, DeepMerge'sHashmonkey patch is not compatible with Rails 7.1 (see rails#49457).This commit changes
require 'deep_merge'torequire 'deep_merge/core'so that DeepMerge'sHashmonkey patch is no longer loaded. Users who rely on the monkey patch can load it manually viarequire 'deep_merge/deep_merge_hash'.Closes #314.