Raise on deprecation when SOLIDUS_RAISE_DEPRECATIONS set#5813
Raise on deprecation when SOLIDUS_RAISE_DEPRECATIONS set#5813kennyadsl merged 2 commits intosolidusio:mainfrom
SOLIDUS_RAISE_DEPRECATIONS set#5813Conversation
SOLIDUS_RAISE_DEPRECATIONS set
e798682 to
6877d7a
Compare
|
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 <chris@super.gd>
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 <benjamin@super.gd>
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. |
kennyadsl
left a comment
There was a problem hiding this comment.
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
DummyAppis 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: