Skip to content
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

Fix includes of deprecation proxy modules #45251

Merged
merged 2 commits into from
Jun 6, 2022

Conversation

jhawthorn
Copy link
Member

@jhawthorn jhawthorn commented Jun 2, 2022

Previously (at least since #36557), including/prepending/extending one of these deprecated constants would silently succeed, since the proxy is a module.

This adds a defintion for append_features/prepend_features/extended so that it can forward the inclusion onto the target module and issue the deprecation warning.

I noticed this due to the change in #45180

@jhawthorn jhawthorn changed the title Deprecated constant for module Fix includes of deprecation proxy modules Jun 2, 2022
Previously, including/prepending/extending one of these deprecated
constants would silently succeed, since it is a module.

This adds a defintion for append_features/prepend_features/extended so
that it can forward the inclusion onto the target module.
The first argument to DeprecatedConstantProxy should be the old constant
name. I suspect this was automatically corrected by accident.
@jhawthorn jhawthorn force-pushed the deprecated_constant_for_module branch from 9781966 to c81a9bc Compare June 3, 2022 01:14
@jhawthorn jhawthorn requested a review from matthewd June 3, 2022 01:40
@jhawthorn jhawthorn merged commit 2c1c65b into rails:main Jun 6, 2022
@jhawthorn jhawthorn deleted the deprecated_constant_for_module branch June 6, 2022 17:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants