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

Remove all code deprecated in Solidus v2.x #3818

Merged
merged 137 commits into from
Jan 29, 2021

Conversation

kennyadsl
Copy link
Member

@kennyadsl kennyadsl commented Oct 29, 2020

Closes #3816

Now that master points to Solidus 3.0, we can remove all code deprecated in Solidus 2.x and introduce the breaking changes of this major.

Removals without deprecation

  • Spree::LineItem::CurrencyMismatch exception: we are not using it anymore since the behavior we had with Spree::Config.raise_with_invalid_currency = true has been removed.
  • Spree::Order::Checkout is not used anymore.
  • Spree::Admin::PaymentsHelper is not used anymore.
  • UserPaymentSource is empty after removing all deprecated methods inside it.
  • Spree::Refund#perform_after_create attribute, if you are still using it, please stop, it does nothing now.
  • Spree::TaxCalculator#ShippingRate: it is now always nil
  • Spree::Money::RUBY_NUMERIC_STRING: was only used in a deprecated code path.

Preferences

We removed the following preferences without deprecations. They were just controlling a deprecated flow and have no effect so, assuming you already switched to the only accepted value, you can safely remove them.

  • Spree::Config.raise_with_invalid_currency
  • Spree::Config.redirect_back_on_unauthorized preference
  • Spree::Config.run_order_validations_on_order_updater preference
  • Spree::Config.use_legacy_order_state_machine
  • Spree::Config.use_legacy_store_credit_reimbursement_category_name
  • Spree::Config.consider_actionless_promotion_active
  • Spree::Config.use_legacy_address_state_validator (removed in Remove legacy address state validation logic #3847)
  • Spree::Config.use_combined_first_and_last_name_in_address (removed in Remove deprecated name-related Address fields #3820)

@kennyadsl kennyadsl force-pushed the kennyadsl/remove-all-deprecations branch from ff9c686 to e8da891 Compare October 30, 2020 09:58
@DanielePalombo DanielePalombo force-pushed the kennyadsl/remove-all-deprecations branch from 3f98930 to cf293a6 Compare October 30, 2020 14:48
@kennyadsl kennyadsl force-pushed the kennyadsl/remove-all-deprecations branch 6 times, most recently from bae6330 to c79faaf Compare November 4, 2020 17:45
@kennyadsl kennyadsl force-pushed the kennyadsl/remove-all-deprecations branch 5 times, most recently from dfece2c to 175af5f Compare November 11, 2020 15:27
@kennyadsl kennyadsl force-pushed the kennyadsl/remove-all-deprecations branch 3 times, most recently from e1bbf4f to 5a6e786 Compare November 13, 2020 07:21
@DanielePalombo DanielePalombo force-pushed the kennyadsl/remove-all-deprecations branch from 5af1c25 to 3c2a695 Compare November 13, 2020 17:29
@kennyadsl kennyadsl self-assigned this Nov 17, 2020
@kennyadsl kennyadsl force-pushed the kennyadsl/remove-all-deprecations branch 4 times, most recently from 042d20a to 7669852 Compare November 19, 2020 16:03
kennyadsl and others added 27 commits January 28, 2021 17:26
`with_adjustments` was deprecated and never used within
the whole codebase.
PricingHelper made current_currency helper method available at controller/view level.
Spree::Order::Search::Base was alowing to set the currency directly. It
now requires using pricing_options
Removes:

- `Spree::Config.events.subscribers` in favor of `.subscriber_registry`
- meta-generated handlers accessors in `Spree::Event::Subscriber.event_action`
- `Spree::Event::Subscriber#subscribe! and #unsubscribe!
Deprecated in favor of Spree::Core::Environment::Promotions.
…uantity and Spree::TestingSupport::CapybaraExt.wait_for_ajax

ref solidusio@f8fe5c6
and
solidusio@80abce4
This commit removes all the spree_get, spree_post, etc. methods
that we deprecated a while ago. We are now using plain get, post,
etc. from RSpec.
The new suggested approach of setting preference is stubbing
them so there's no need to reset preferences anymore.
They are not raised anymore. This commit also refactor
that specific piece a little bit.
I also add the require of `active_support` on
core/lib/spree/core/class_constantized.rb because it's required to use the delegate method
https://github.com/solidusio/solidus/blame/33821050ad299640ea31d104a59dd38bcd97ae2a/core/lib/spree/core/class_constantizer.rb#L25
It is now bin/sandbox
Spree::Calculator::FreeShipping
Spree::Calculator::PercentPerItem
Spree::Caluclator::PriceSack

These class were present in the codebase but not available anywhere
in the admin since they are not added in the array of available
calculators in app_configuration.rb.
The _deprecated_variables.scss file is empty now but
I think we can keep it to create a standard to deprecate
scss variables.
in favor of .pill-
@kennyadsl kennyadsl force-pushed the kennyadsl/remove-all-deprecations branch from 90afece to 5e3b610 Compare January 28, 2021 16:26
@kennyadsl kennyadsl merged commit dc813e6 into solidusio:master Jan 29, 2021
@kennyadsl kennyadsl deleted the kennyadsl/remove-all-deprecations branch January 29, 2021 10:50
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.

Remove all deprecated code for Solidus 3.0
5 participants