New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Soft-deprecate the `HashWithIndifferentAccess` constant #28157

Merged
merged 2 commits into from Feb 25, 2017

Conversation

Projects
None yet
4 participants
@robin850
Member

robin850 commented Feb 24, 2017

Hi,

That's just a second take on #27925. This version just softly deprecates the top-level HashWithIndifferentAccess constant rather than trying to display a deprecation message since this constant and the ActiveSupport-scoped one are exactly the same which means that changing one inevitably changes the other.

PS : Even though it's not yet posted, I took the liberty to add the link to the 5.1 release notes in the upgrade guides to avoid missing it writing the other steps of the upgrade process.

Have a nice day ! :-)

robin850 added some commits Feb 24, 2017

Soft-deprecate the top-level HashWithIndifferentAccess class
Since using a `ActiveSupport::Deprecation::DeprecatedConstantProxy`
would prevent people from inheriting this class and extending it
from the `ActiveSupport::HashWithIndifferentAccess` one would break
the ancestors chain, that's the best option we have here.
Add few tests for the top level `HashWithIndifferentAccess`
This ensures that if we try to hard-deprecate it again in the future,
we won't break these behaviors.

@matthewd matthewd merged commit ac57a3e into rails:master Feb 25, 2017

2 checks passed

codeclimate no new or fixed issues
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

matthewd added a commit that referenced this pull request Feb 25, 2017

Merge pull request #28157 from robin850/hwia-soft-deprecation
Soft-deprecate the `HashWithIndifferentAccess` constant

@robin850 robin850 deleted the robin850:hwia-soft-deprecation branch Feb 25, 2017

@@ -1,3 +1,9 @@
* Soft-deprecated the top-level `HashWithIndifferentAcces` constant.

This comment has been minimized.

@et

et Feb 25, 2017

typo on HashWithIndifferentAcces

@et

et Feb 25, 2017

typo on HashWithIndifferentAcces

This comment has been minimized.

@kamipo

kamipo Feb 25, 2017

Member

Fixed in dd3adc5.

@kamipo

kamipo Feb 25, 2017

Member

Fixed in dd3adc5.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment