v3.0.0
🎉 Solidus 3.0 is out!
This version is almost identical to the last 2.11.x version with the only difference that we removed all the code deprecated. Here's a list of things to take into account while upgrading.
Major Changes
Removal of all code deprecated during the 2.x series
The main change in this major version is the removal of all deprecated code that
we introduced during the 2.x series. This means that if any code that was deprecated
is still being used, the application will break. Following the deprecation messages
in the application logs, it should be quite easy to spot what code needs to be changed.
The main things that could break a Solidus application are:
Paranoia gem has been replaced by Discard gem
All references to methods added to models by Paranoia will raise a NoMethodError exception now.
Some of those methods are:
paranoia_destroy
paranoia_delete
with_deleted
only_deleted
really_destroy!
after_real_destroy
Pull Requests:
Removed core support to first_name and last_name in Spree::Address
In Solidus v2.11, we added a name
attribute to Spree::Address
, which is being populated combining
first_name
and last_name
values every time a new address is added to the system. We also provided
a rake task to update all existing records in order to get applications ready for Solidus 3.0.
With this major version, name
is the only supported attributes. first_name
and last_name
fields are already in the database
so if needed, a store can revert this change by implementing its own logic.
See 3234 for the rationale behind this change.
Pull Requests:
- Move Spree::Address#name attribute to the db #3908 (filippoliverani)
- Remove deprecated name-related Address fields #3820 (filippoliverani)
All the other deprecations removal
For a complete reference to rest of the code removed, these PRs can be taken as reference:
- Remove deprecated attachment_partial_name #3974 (kennyadsl)
- Remove legacy address state validation logic #3847 (cedum)
- Raise canceling a payment when try_void is not implemented #3844 ([kennyadsl](https://
- Remove all code deprecated in Solidus v2.x #3818 (kennyadsl)
Removal without deprecations
We also removed some code that didn't need a deprecation warning. Be sure that your
codebase doesn't use any of the following:
Spree::LineItem::CurrencyMismatch
exception: we are not using it anymore since the behavior we had withSpree::Config.raise_with_invalid_currency = true
has been removed.Spree::Order::Checkout
is not used anymore.Spree::Core::StateMachines::Order
is identical.Spree::Admin::PaymentsHelper
module is empty after removing all deprecated methods inside it.UserPaymentSource
is empty after removing all deprecated methods inside it.Spree::Refund#perform_after_create
attribute, it was into a deprecated path. If you are still using it, please stop, it does nothing now.Spree::TaxCalculator#ShippingRate
: it is alwaysnil
now.Spree::Money::RUBY_NUMERIC_STRING
: was only used in a deprecated code path.
We also 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 from your initializer. You'll probably notice that because your app won't start.
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
Spree::Config.use_combined_first_and_last_name_in_address
By default, do not require the whole Rails framework
This shouldn't give any issue in host applications, but if that happens,
it can be easily fixable opening config/application.rb
and add require 'rails/all'
or
the specific part of Rails needed by the application.
Switch Paperclip dependency to its maintained version
We recently added support for Active Support, which will be the default in Solidus 3.0.
Paperclip will still be around and supported for a while because we don't want to force
existing stores to accomplish the assets migration. While we support it, we want to use
the maintained fork.
- Switch to maintained Paperclip fork #3913 (filippoliverani)
Misc
- Bump removal horizon for 3.x deprecations #4025 (kennyadsl)
- Add Post-Install message to Solidus 3.0 #3985 (kennyadsl)
- Add Active Storage in Dummy App for extensions #3969 (kennyadsl)
- Improve Active Storage configuration for in-memory Dummy App #3970 (kennyadsl)
- Allow users to create blank issues in GitHub #3943 (kennyadsl)
- Install Active Storage by default on new stores #3938 (kennyadsl)
- Avoid too many prompts during solidus:install generator #3937 (kennyadsl)
- Align Rubocop ruby version to gemspec #3935 (spaghetticode)
- Skip adding webpacker gem when generating dummyapp #3922 (SamuelMartini)
- allow customize database credentials for test app #3921 (ccarruitero)
- Bump redcarpet from 3.4.0 to 3.5.1 in /guides #3890 (dependabot)
- Adjust CircleCI config to reflect Rails versions that we support #3885 (kennyadsl)
- Bump axios from 0.18.1 to 0.21.1 in /guides #3881 (dependabot)
- Bump ini from 1.3.5 to 1.3.7 in /guides #3861 (dependabot)
- Drive community to GitHub Discussions when opening issues #3857 (kennyadsl)
github.com/kennyadsl)) - Update governance with latest changes to the organization #3836 (kennyadsl)
- Fix install instructions in Solidus Guides #3833 (ikraamg)
- Update install instructions after 2.11 release #3825 (kennyadsl)
- Move "thinking cat" fixture to lib folder #3824 (mamhoff)
- Update readme with Solidus demo URL #3822 (seand7565)
- Fix headers in changelog #3812 (jarednorman)
- Fixed typo with misspell #3811 (hsbt)