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

Resolve deprecation warnings #1521

Open
6 tasks done
vohmar opened this issue Feb 7, 2020 · 3 comments
Open
6 tasks done

Resolve deprecation warnings #1521

vohmar opened this issue Feb 7, 2020 · 3 comments
Assignees

Comments

@vohmar
Copy link
Contributor

vohmar commented Feb 7, 2020

There are very many deprecation warnings returned during deployment clogging the logs. Let get rid of these.

Current master build: https://travis-ci.org/internetee/registry/builds/647285407

  • /home/travis/build/internetee/registry/app/models/payment_orders/bank_link.rb:92: warning: BigDecimal.new is deprecated; use BigDecimal() method instead.
  • The behavior of changed_attributes inside of after callbacks will be changing in the next version of Rails. The new return value will reflect the behavior of calling the method after save returned (e.g. the opposite of what it returns now). To maintain the current behavior, use saved_changes.transform_values(&:first) instead. (called from update_related_whois_records at /home/travis/build/internetee/registry/app/models/contact.rb:487)
  • The behavior of changes inside of after callbacks will be changing in the next version of Rails. The new return value will reflect the behavior of calling the method after save returned (e.g. the opposite of what it returns now). To maintain the current behavior, use saved_changes instead. (called from update_related_whois_records at /home/travis/build/internetee/registry/app/models/contact.rb:487)
  • The behavior of changed inside of after callbacks will be changing in the next version of Rails. The new return value will reflect the behavior of calling the method after save returned (e.g. the opposite of what it returns now). To maintain the current behavior, use saved_changes.keys instead. (called from update_related_whois_records at /home/travis/build/internetee/registry/app/models/contact.rb:487)
  • The behavior of attribute_change inside of after callbacks will be changing in the next version of Rails. The new return value will reflect the behavior of calling the method after save returned (e.g. the opposite of what it returns now). To maintain the current behavior, use saved_change_to_attribute instead. (called from update_related_whois_records at /home/travis/build/internetee/registry/app/models/contact.rb:487)
  • The behavior of attribute_changed? inside of after callbacks will be changing in the next version of Rails. The new return value will reflect the behavior of calling the method after save returned (e.g. the opposite of what it returns now). To maintain the current behavior, use saved_change_to_attribute? instead. (called from update_related_whois_records at /home/travis/build/internetee/registry/app/models/contact.rb:487)
@yulgolem
Copy link
Contributor

yulgolem commented Feb 7, 2020

The main bunch of changed deprecated warnings comes form the papertrail gem - so we need either pump it's version to latest (requires some refactoring due to papertrail API changes) or get rid of it completely.

@vohmar
Copy link
Contributor Author

vohmar commented Feb 7, 2020

Getting rid of papertrail is not possible at the moment because we have nothing to replace it with. So refactoring it is unless it's multi-day undertaking

@yulgolem
Copy link
Contributor

yulgolem commented Feb 7, 2020

The refactoring will take from a couple of hours to a couple of days.
But I've silenced them by setting config.active_support.deprecation = :silence in config/environments/test.rb. Note - they are not resolved, just silenced.
Courtesy of #1522

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

No branches or pull requests

2 participants