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 and GraphQL support).
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:
- Cart endpoints (Create Cart, Add Item, Set Quantity, Remove Item, Empty Cart)
- Checkout endpoints (Update Checkout, Advance Checkout, Complete Checkout, Add/Remove Store Credit, Get Shiping Rates, Get Payment Methods)
- Products Catalog
- Taxons Catalog
- Account endpoints (Account Information, Credit Cards, placed Orders)
- Order Status
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
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.
We’re introducing a new painless way of customizing Spree without the need of decorators. With Dependencies you can easily replace parts of Spree internals with your custom classes. You can replace Services, Abilities, and Serializers. More will come in the future. We hope using Dependencies will remove the need for creating decorators at all!
Removing Coffee Script
Improved MySQL support
A lot of merchants were using Spree with MySQL for years now, but the 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.
And hundreds of other fixes and improvements
Feel free to learn more on GitHub.