Spree Commerce v4.0.0 Release Notes

Release Date: 2019-10-09 // over 4 years ago
  • Major/New Features

    ๐Ÿฑ Rails 6.0 support ๐Ÿ’ฅ ๐Ÿ’ฅ ๐Ÿ’ฅ

    Spree 4.0 is fully compatible with Rails 6.0 and the new default Zeitwerk code autoloader.

    ๐Ÿฑ Storefront and Admin Panel moved to Bootstrap 4.2 ๐ŸŽจ

    โšก๏ธ We've migrated both the default Spree frontend and Admin Panel from Bootstrap 3 to Bootstrap 4.2. This update brings all of the new features and fixes introduced in Bootstrap 4, 4.1 and 4.2. Accessibility and RWD were also improved in the process.

    โฌ†๏ธ Besides the Spree Frontend and Admin Panel we've also upgraded all extensions that required fixes, that is:

    โšก๏ธ If you use any of those extensions please update them along with the Spree update.

    โž• Address Book support ๐Ÿ 

    โž• Previously for multiple addresses support you had to use the Spree Address Book extension. We've decided that this was an inconsistency (user account already supported multiple credit cards) and moved this code into the core Spree and improved it.

    Thanks to this signed in customers can manage multiple addresses in the Checkout and Account for both Shipping and Billing.

    JSON-LD structured data support ๐ŸŒ

    ๐Ÿ” To support schema.org we've replaced the old Microdata code with the new recommended JSON-LD format. This will make your store more future proof and improve SEO in the coming months.

    Installation

    โž• Add Spree gems to Gemfile

    gem 'spree', '~\> 4.0'gem 'spree\_auth\_devise', '~\> 4.0'gem 'spree\_gateway', '~\> 3.6'
    

    โš™ Run bundle install

    ๐Ÿ‘‰ Use the install generators to set up Spree

    rails g spree:install --user\_class=Spree::User rails g spree:auth:install rails g spree\_gateway:install
    

    โฌ†๏ธ Upgrade

    โฌ†๏ธ Official Spree 3.7 to 4.0 upgrade guide

    Noteworthy changes

    Please review each of the noteworthy changes to ensure your customizations or extensions are not affected. If you are affected by a change and have any suggestions please submit a PR to help the next person!

    โž• Added presence and uniqueness validation for Country#iso and Country#iso3 attributes

    Spark Solutions

    โž• Added additional default zones (Asia, South America, Middle East)

    lon10

    ๐Ÿ›  Fixed potential XSS on Product Page

    Atsushi Yamamoto

    โž• Added ability to set time parts of a promotion period

    kirikiriyamama

    ๐Ÿ‘‰ Use API v2 for country state and zip in the Checkout address form

    Matthew Kennedy

    โž• Added id to currency & security card divs in Admin Panel General Settings for easier override

    Atsushi Yamamoto

    โž• Added .cache class in Admin Panel General Settings for easier override

    Atsushi Yamamoto

    Added Order#valid_promotions and Order#valid_promotion_ids methods

    Spark Solutions

    โšก๏ธ Updated factory_bot to 5.0

    Spark Solutions

    โšก๏ธ Updated cancancan to 3.0

    Spark Solutions

    โšก๏ธ Updated Capybara to 3.24

    Thomas Walpole

    โšก๏ธ Updated rspec-rails to 4.0

    Spark Solutions

    โšก๏ธ Updated ransack to 3.2.0

    Spark Solutions

    ๐Ÿšš Moved ProductScopes into a Concern

    Spark Solutions

    Deprecated TestingSupport::ControllerRequests methods like spree_get, spree_post etc

    Spark Solutions

    โœ‚ Removed deprecated OrderContents

    Amalrik Maia

    โœ‚ Removed deprecated Address#iso_name method

    Spark Solutions

    โœ‚ Removed deprecated Adjustment#open and Adjustment#closed scopes

    Spark Solutions

    โœ‚ Removed deprecated BaseHelper#variant_options method

    Spark Solutions

    โœ‚ Removed deprecated Order#set_currency method

    Spark Solutions

    Removed deprecated Order#register_line_item_comparison_hook method

    Spark Solutions

    โœ‚ Removed deprecated Order#guest_token method

    Spark Solutions

    โœ‚ Removed deprecated Address#same_as method

    Spark Solutions

    Removed deprecated hash case in Order#create_line_items_from_params

    Spark Solutions

    Removed deprecated Order#line_item_options_match

    Spark Solutions

    โœ‚ Removed deprecated OrdersController#populate and OrdersController#populate_redirect actions

    Amalrik Maia

    โœ‚ Removed deprecated RespondWith module

    Spark Solutions

    Replaced Spree::ProductScopes with a concern

    Spark Solutions

    ๐Ÿ—„ Replaced deprecated chromedriver-helper with webdrivers gem

    Spark Solutions

    Replaced ControllerRequests#spree_ methods with standard get/post/put/etc

    Spark Solutions

    โฌ‡๏ธ Dropped acts-as-taggable-on dependency and tag support. This will be later moved into an extension after acts-as-taggable-on will fully support Rails 6.0

    Spark Solutions

    โฌ‡๏ธ Dropped Paperclip support

    Amalrik Maia

    โฌ‡๏ธ Dropped deface dependency

    Spark Solutions

    โฌ‡๏ธ Dropped versioncake dependency

    Spark Solutions

    โฌ‡๏ธ Dropped rspec-collection_matchers dependency

    Spark Solutions

    โฌ‡๏ธ Dropped rspec-its dependency

    Spark Solutions

    Full Changelog

    You can view the full changes using Github Compare.