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

Extract backwards compatibility logic to a method #359

Merged
merged 1 commit into from
Oct 31, 2017

Conversation

tombruijn
Copy link
Member

This keeps the backwards compatibility logic in one place, rather than
part of Appsignal::Config#load_from_disk.

Also print a warning message when an old key name is found and delete it
from the config hash, so it can't be accidentally used by something
else, internally or by the user.

This allows us to actually remove these old keys, because now they're
silently supported. Suddenly removing support for these keys could
introduce a (small) new wave of support issues.

@tombruijn tombruijn self-assigned this Oct 29, 2017
@tombruijn tombruijn force-pushed the refactor/config-load_from_disk branch from eba5729 to 0bd362f Compare October 29, 2017 14:32
@tombruijn tombruijn mentioned this pull request Oct 30, 2017
@jeffkreeftmeijer
Copy link
Member

Code looks good, but I think using "deprecated" instead of "old" to refer to the keys would be just a little more descriptive.

This keeps the backwards compatibility logic in one place, rather than
part of `Appsignal::Config#load_from_disk`.

Also print a warning message when an old key name is found and delete it
from the config hash, so it can't be accidentally used by something
else, internally or by the user.

This allows us to actually remove these old keys, because now they're
silently supported. Suddenly removing support for these keys could
introduce a (small) new wave of support issues.
@tombruijn tombruijn force-pushed the refactor/config-load_from_disk branch from 0bd362f to 7529bf5 Compare October 30, 2017 17:19
@tombruijn
Copy link
Member Author

@jeffkreeftmeijer updated the constant name. I'm thinking of merging this, as it's quite a small change aimed at printing deprecation warnings. Did you have any other comments in your review?

@tombruijn tombruijn changed the base branch from master to develop October 30, 2017 19:29
@tombruijn tombruijn merged commit 53b1ff4 into develop Oct 31, 2017
@tombruijn tombruijn deleted the refactor/config-load_from_disk branch October 31, 2017 09:50
jeffkreeftmeijer added a commit that referenced this pull request Nov 26, 2020
tombruijn pushed a commit that referenced this pull request Jan 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants