Skip to content

v2.4.0

Compare
Choose a tag to compare
@jhawthorn jhawthorn released this 07 Nov 21:26
· 6390 commits to main since this release
v2.4.0
a40d8e4

Announcing Solidius 2.4.0! Just in time for Black Friday (for the brave upgraders).

A major change in this version is the the removal of RABL templates in the API in favour of JBuilder. The admin also sports a new cleaner look for tables and some other elements.

on github
on rubygems

Solidus 2.4.0

Major changes

  • Replace RABL with Jbuilder #2147 #2146 (jhawthorn)

    We've changed our JSON templating language for both the API and admin from
    RABL to Jbuilder.
    Jbuilder is faster and much more widely used (ships with Rails).

    API responses should be identical, but stores which customized API responses
    using RABL or added their own endpoints which extended Solidus' RABL partials
    will need to be updated.

  • Remove rescue_from StandardError in Api::BaseController #2139 (jhawthorn)

    Previously, exceptions raised in the API were caught (via rescue_from) and
    didn't reach the default Rails error handler. This caused many exceptions to
    avoid notice, both in production and in tests.

    This has been removed and exceptions are now reported and handled normally.

  • New admin table design #2159 #2100 #2143 #2123 #2165 (Mandily, graygilmore, tvdeyen)

    Tables throughout the admin have been redesigned to be simpler and clearer.
    Borders between cells of the same row have been dropped, row striping has been
    removed, and icons are simpler and more clearly attached to their row.

  • Introduce Stock::SimpleCoordinator #2199 (jhawthorn)

    The previous stock coordinator had incorrect behaviour when any stock location was low on stock.

    The existing stock coordinator classes, Coordinator, Adjuster, Packer, and
    Prioritizer, have been replaced with the new Stock::SimpleCoordinator. In most
    cases this will coordinate stock identically to the old system, but will
    succeed for several low-stock cases the old Coordinator incorrectly failed on.

    Stores which have customized any of the old Coordinator classes will need to
    either update their customizations or include the solidus_legacy_stock_system
    extension, which provides the old classes.

Core

  • Replace Stock::Coordinator with Stock::SimpleCoordinator #2199 (jhawthorn)

  • Wrap Splitter chaining behaviour in new Stock::SplitterChain class #2189 (jhawthorn)

  • Remove Postal Code Format Validation (and Twitter CLDR dependency) #2233 (mamhoff)

  • Switch factories to strings instead of constants #2230 (cbrunsdon)

  • Roll up migrations up to Solidus 1.4 into a single migration #2229 (cbrunsdon)

  • Support non-promotion line-level adjustments #2188 (jordan-brough)

  • Fix StoreCredit with multiple currencies #2183 (jordan-brough)

  • Add Spree::Price to ProductManagement role #2182 (swcraig)

  • Remove duplicate error on StoreCredit#authorize failure #2180 (jordan-brough)

  • Add dependent: :destroy for ShippingMethodZones join model #2175 (jordan-brough)

  • Fix method missing error in ReturnAuthorization#amount #2162 (luukveenis)

  • Use constants instead of translations for StoreCreditType names #2157 (swcraig)

  • Enable custom shipping promotions via config.spree.promotions.shipping_actions #2135 (jordan-brough)

  • Validate that Refunds have an associated Payment #2130 (melissacarbone)

  • Include completed payment amounts when summing totals for store credit #2129 (luukveenis)

  • Allow dev mode code reloading of configured classes #2126 (jhawthorn)

  • Override model_name.human for PaymentMethod #2107 (jhawthorn)

  • Fix class/module nesting #2098 (cbrunsdon)

  • Reduce number of SQL statements in countries seeds #2097 (jhawthorn)

  • Rename Order#update! to order.recalculate #2072 (jhawthorn)

  • Rename Adjustment#update! to Adjustment#recalculate #2086 (jhawthorn)

  • Rename Shipment#update! to Shipment#update_state #2085 (jhawthorn)

  • Fix shipping method factory for stores with alternate currency #2084 (Sinetheta)

  • Added a configurable Spree::Payment::Cancellation class #2111 (tvdeyen)

  • Remove set_current_order calls in Spree::Core::ControllerHelpers::Order
    #2185 (Murph33)

    Previously a before filter added in
    core/lib/spree/core/controller_helpers/order.rb would cause SQL queries to
    be used on almost every request in the frontend. If you do not use Solidus
    Auth you will need to hook into this helper and call set_current_order where
    your user signs in. This merges incomplete orders a user has going with their
    current cart. If you do use Solidus Auth you will need to make sure you use a
    current enough version (>= v1.5.0) that includes this explicit call. This
    addresses #1116.

  • Remove ffaker as a runtime dependency in production. It needs to be added to the Gemfile for factories to be used in tests #2163 #2140 (cbrunsdon, swcraig)

  • Invalidate existing non store credit payments during checkout 2075 (tvdeyen)

  • The all configuration objects now use static preferences by default. It's no longer necessary to call use_static_preferences!, as that is the new default. For the old behaviour of loading preferences from the DB, call config.use_legacy_db_preferences!. #2112 (jhawthorn)

  • Assign and initialize Spree::Config earlier, before rails initializers #2178 (cbrunsdon)

API

  • Replace RABL with Jbuilder #2147 #2146 (jhawthorn)
  • Move API pagination into a common partial #2181 (jhawthorn)
  • Fix references to nonexistent API attributes #2153 (jhawthorn)
  • Remove rescue_from StandardError in Api::BaseController #2139 (jhawthorn)
  • Fix error when passing coupon_code to api/checkouts#update #2136 (jhawthorn)
  • Improved error handling and performance for moving inventory units between shipments and stock locations #2070 (mamhoff)
  • Remove unnecessary Api::Engine.root override #2128 (jhawthorn)

Admin

Frontend

Removals

Deprecations

  • Deprecate .calculators #2216 (cbrunsdon)
  • Deprecate pagination in searcher #2119 (cbrunsdon)
  • Deprecate tasks in core/lib/tasks #2080 (cbrunsdon)
  • Deprecate Spree::OrderCapturing class #2076 (tvdeyen)
  • Deprecated Spree::PaymentMethod#cancel #2111 (tvdeyen)
    Please implement a try_void method on your payment method instead that returns a response object if void succeeds or false if not. Solidus will refund the payment then.
  • Deprecates several preference fields helpers in favor of preference field partials. #2040 (tvdeyen)
    Please render spree/admin/shared/preference_fields/#{preference_type} instead
  • Check if deprecated method_type is overridden #2093 (jhawthorn)
  • Deprecate support for alternate Kaminari page_method_name #2115 (cbrunsdon)