Spree v3.7.0.rc1 Release Notes

Release Date: 2019-01-11 // over 5 years ago
  • Major/New Features

    🚀 3.7 release is our last 3.x line release bridging the gap between 3.x and Spree 4.0. This is a big release packed with several amazing features and a huge number of bug fixes (over 700 commits by 17 contributors!). Upgrading to 3.7 guarantees a smooth and easy migration to Spree 4.0 (April 2019 with Rails 6.0 support).

    💎 Spree 3.7 requires Rails 5.2.2 and Ruby 2.3.3 (or higher).

    Storefront API v2

    🏗 We've worked hard over the last few months to deliver a completely new, easy to work with and lightweight REST API for building amazing customer interfaces with modern JavaScript libraries (React, Vue, Angular) and for native mobile apps. New Storefront API v2 is fast, easy to use and extend. It's also well documented in OpenAPI 3.0 (Swagger) format which you can import into Postman app.

    New API is based on JSON API spec and uses blazing fast Netflix fast_json_api serializer library. Authentication is based on Oauth using doorkeeper library. Besides that there are no additional dependencies making it lightweight and future-proof.

    Storefront API v2 consists of:

    📜 All of the endpoints support JSON API's Sparse Fieldsets to fix usual Over-Fetching issues and Related Resources to reduce the number of API queries you need to perform.

    Service Oriented Architecture

    🔨 While building the API v2 we've also refactored a huge portion of Spree internals by introducing modular Service Oriented Architecture to the codebase.

    We're in the process of moving domain-specific code from models to Service Objects with a well-defined scope and predictable return values. All service objects include Service Module which unifies how those classes handle arguments and what they return.

    Also, we're moving away from ransack library by introducing Finders and Sorters classes for simpler fetching resources and collections.

    This makes Spree codebase easier to read and learn. It also makes any customizations way easier. At the same time, public APIs won't change a lot as providing backward compatibility is one of our top priorities.

    Removing Coffee Script

    🍱 CoffeeScript a few years back ago was a really great JavaScript enhancement. Nowadays with ES6 and TypeScript around it became obsolete. That's why we've converted all of the CoffeeScript assets in Spree and extensions to plain JavaScript and removed CoffeeScript dependency.

    👌 Improved MySQL support

    🏗 A lot of merchants were using Spree with MySQL for years now, but development of the platform was mainly focused on PostgreSQL support. We've changed that and all of our CI builds are tested and verified against both PostgreSQL and MySQL. We've also fixed all MySQL-related bugs.

    Installation

    ➕ Add Spree gems to Gemfile

    gem 'spree', '~\> 3.7.0.rc1'gem 'spree\_auth\_devise', '~\> 3.4'gem 'spree\_gateway', '~\> 3.4'
    

    ⚙ 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

    ⬆️ Spree 3.6 to 3.7 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!

    ⬇️ Dropped support for Ruby 2.2

    Spark Solutions

    👌 Support multiple currencies for Store Credits management in Admin Panel

    Spark Solutions

    ➕ Added information if Product is backorderable on Product page

    Spark Solutions

    👌 Improved OmniChannel support in the Admin Panel

    Spark Solutions

    👌 Improved error handling for XHR requests in the Admin Panel

    Vernon de Goede

    👌 Improved Admin Panel Variant autocomplete

    Spark Solutions

    Order is now associated with Store, the presence of Store is required for validation

    Spark Solutions

    Order now has to have currency value set

    Spark Solutions

    0️⃣ Made CreditCard deleted softly by default

    Spark Solutions

    Payment source needs to be present (validation can be turned off via source_required? in PaymentMethod)

    Spark Solutions

    ➕ Added StockLocation#name unique validation

    himanshumishra31

    ➕ Added FulfilmentChanger class

    Spark Solutions

    Extended OrderPromotion model

    Spark Solutions

    ➕ Added ShippingRate#final_price method

    Spark Solutions

    ➕ Added Shipment#free? method

    Spark Solutions

    0️⃣ Added Product#default_variant and Product#default_variant_id methods

    Spark Solutions

    Replaced jquery.cookie with js.cookie

    Spark Solutions

    🛠 Fixed deprecation warning: BigDecimal.new() is deprecated

    Deepak Mahakale

    🛠 Fixed displaying currency in Admin Panel -> Return Authorizations

    Spark Solutions

    🛠 Fixed all deprecations of Ruby Money 6.13+

    Spark Solutions

    Fallback to Order#currency if there's no currency set for Adjustment

    Spark Solutions

    📇 Renamed Order#guest_token to Order#token

    Spark Solutions

    📇 Renamed Admin::GeneralSettingsHelper to Admin::CurrencyHelper

    Spark Solutions

    📇 Renamed TaxonIcon to TaxonImage

    Spark Solutions

    🗄 Deprecated OrderContents and replaced with several Cart services (eg. Cart::AddItem)

    Spark Solutions

    Deprecated Order#add_store_credit_payments in favor of Checkout::AddStoreCredit service

    Spark Solutions

    Deprecated Order#remove_store_credit_payments in favor of Checkout::RemoveStoreCredit service

    Spark Solutions

    🗄 Deprecated OrdersController#populate and OrdersController#populate_redirect

    Spark Solutions

    🗄 Deprecated Address#same_as? in favor of Address#==

    Spark Solutions

    Deprecated Order#add register_line_item_comparison_hook (please use Rails.application.config.spree.line_item_comparison_hooks << hook instead)

    Spark Solutions

    🗄 Deprecated ControllerHelpers::RespondWith

    Spark Solutions

    🗄 Deprecated BaseHelper#variant_options

    Spark Solutions

    ✂ Removed previously deprecated Spree::Core::EnvironmentExtension

    Spark Solutions

    ✂ Removed previously deprecated ControllerHelpers::Common#render_404

    Spark Solutions

    ✂ Removed previously deprecated EmailValidator

    Spark Solutions

    ✂ Removed previously deprecated NavigationHelper#icon

    Spark Solutions

    ✂ Removed previously deprecated FrontendHelper#breadcrums

    Spark Solutions

    Removed Product#distinct_by_product_ids

    Spark Solutions

    ⬆️ Bumped highline dependency to 2.0.x

    Chamnap Chhorn

    ⬆️ Bumped paperclip dependency to 6.1.x

    Josh Powell

    ⬆️ Bumped bootstrap-sass to 3.4.x

    Spark Solutions

    Full Changelog

    You can view the full changes using Github Compare.