-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Raise on deprecation when SOLIDUS_RAISE_DEPRECATIONS
set
#5813
Raise on deprecation when SOLIDUS_RAISE_DEPRECATIONS
set
#5813
Conversation
SOLIDUS_RAISE_DEPRECATIONS
set
e798682
to
6877d7a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work!
It looks like this change has exposed some other tests that should have been raising exceptions but were not. (Because So we'll need to go back and fix those up before merging, it seems. |
Thanks for this! We should restore the previous behavior to spot failing specs for deprecations, like it's already happening it seems. Thanks again. ❤️ |
This spec still used one of the old extension points for the promotion system, and solidusio#5813 exposed that.
Looks like we just need to rebase once #5814 is merged and all will be okay. |
This spec still used one of the old extension points for the promotion system, and solidusio#5813 exposed that.
We can rebase now, thanks! |
6877d7a
to
44f1b9d
Compare
These tests were written to aid in debugging an issue: solidusio#5766 Here we expose an issue using a pending test, with the ENV that allows overriding of the default deprecation behavior, which gets lost during the initialization of the `DummyApp`. Co-authored-by: Chris Todorov <[email protected]>
This change fixes issue solidusio#5766 which seems to be caused by the deprecator behaviour being lost when the dummy app is initialized. By moving the code that sets the behaviour to happen after the initialization of the dummy app we can avoid this issue. Co-authored-by: Benjamin Willems <[email protected]>
44f1b9d
to
586c519
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #5813 +/- ##
=======================================
Coverage 88.74% 88.74%
=======================================
Files 735 735
Lines 17172 17172
=======================================
Hits 15239 15239
Misses 1933 1933 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @forkata and @benjaminwil! ❤️
This calculator uses the `eligible` API from `Spree::Adjustment`, which in a system with the new promotions system will not be necessary. This hasn't been caught before because deprecation warnings did not raise until solidusio#5813 was merged.
Summary
Fixes #5766
This issue can be reproduced on the first commit by running the specs with the environment variable to override deprecation behaviour, as such
which produces the following output
We were able to fix this issue by moving the code that sets the deprecation behaviour after the
DummyApp
is initialized, which seems to reset that.Checklist
Check out our PR guidelines for more details.
The following are mandatory for all PRs:
The following are not always needed: