v2.9.0
v2.9.0
Major Changes
Added Spree::Event
Solidus now includes an event library that allows to use different adapters.
The default adapter is based on ActiveSupport::Notifications
library.
Events should allow developers to customize and extend Solidus behavior
more easily by simply subscribing to certain events. Sending emails may be a
simple use case for this new feature.
- ActiveSupport notifications for Events Handling #3081 (spaghetticode)
- Support class reloading for Event Subscribers #3232 (elia)
Attachment adapters
This is the first step to support other files attachment libraries since
Paperclip is no more maintained. Solidus will release the ActiveStorage
support in core in the next releases or via an extension.
Add more fields to the API json response for shipments
This change adds more fields to the API endpoints that return a shipment
object. We had two partials to represent shipments:
small
and
big
but some of the small
fields were not present in the big
partial. Now they
are aligned but users that were using those partials could notice some
difference in how the API endpoints involved respond.
Deprecate reset_spree_preferences in test
Changing preferences and resetting them after any example is not a good
practice and it's error-prone. The new standard is stubbing preferences and
it's enforced with a deprecation of reset_spree_preferences. This way we can
gradually align stores and extensions.
- Allow only stubbed changes to
Spree::Config
in specs #3220 (spaghetticode)
Changed payment method partials name convention
Payment methods partials filename are now expected to be the
Spree::PaymentMethod class underscored instead of downcased. This means that,
for example, for Spree::PaymentMethod::StoreCredit
the corresponding partial
files would be named _store_credit
and not _storecredit
. If you overrode
one of the following files, you should rename it now:
api/app/views/spree/api/payments/source_views/_storecredit.json.jbuilder → api/app/views/spree/api/payments/source_views/_store_credit.json.jbuilder
backend/app/views/spree/admin/payments/source_forms/_storecredit.html.erb → backend/app/views/spree/admin/payments/source_forms/_store_credit.html.erb
backend/app/views/spree/admin/payments/source_views/_storecredit.html.erb → backend/app/views/spree/admin/payments/source_views/_store_credit.html.erb
Also, if you've built your own payment method you may need to change the
corresponding partials filename.
- Change payment method partial name convention #3217 (bitberryru)
Fix non thread safe gateway initialization
ActiveMerchant::Billing::Base.mode
is a global ActiveMerchant
preference
and we were setting it into each payment gateway initialization. This means
that if the last instantiated payment method's mode was different from the
other ones, the last one's mode will be applied to all of them. To fix this
issue we changed how we tell ActiveMerchant that one gateway is in test mode.
Please double check your production configuration for payment methods: only
payment methods where server
preference set to production and test_mode
turned off will work in "production" mode.
- Fix non thread safe gateway initialization #3216 (bitberryru)
Remove name from default ransackable attributes
Ransack needs a whitelist of attributes to perform a search against for security
reasons. We used to whitelist id
and name
for all the models but not all
models have the name
attribute/column making ransack search raise an error.
If you have a custom model and you are performing search against its name
,
now you have to manually add it to the ransackable whitelist for that resource.
Admin restyle
Solidus has a fresh Admin UI! Your eyes will thank you and this would not
impact your store but if you added some custom CSS that matches the old Admin
UI, you probaly have to make some change at it now.
- Update admin color palette and font #3192 (mfrecchiami)
- Add a color to menu selected items #3269 (mfrecchiami)
Changes to how returns are processed from a return item
It you are programmatically calling Spree::ReturnItem#process_inventory_unit!
please notice that it doesn't automatically process return anymore. To remove
the deprecation warning you have to set an attribute on your return_item
instance before calling process_inventory_unit!
:
return_item.skip_customer_return_processing = true
return_item.process_inventory_unit!
# here you should process the customer return manually
- Allow order with multiple line items to be marked as "Returned" #3199 (spaghetticode)
New REST API documentation
Our REST API is now documented using the Open API Specification. The
documentation is part of the repository and published on
https://solidus.docs.stoplight.io/.
- Document the API via OpenAPI #3252 (aldesantis)
Core
- Refactor Promotions Environment Configuration #3239 (kennyadsl)
- Add preferred_reimbursement_type_id as permitted attributes for ReturnAuthorization #3215 (ibudiallo)
- Add OriginalPayment reimbursement type in seeds #3213 (kennyadsl)
- Fixes for discard 1.1.0 #3202 (kennyadsl)
- Improve error messages for wallet payment source #3196 (kennyadsl)
- Use taxon children when searching classification #3168 (fkoessler)
- Improve promotion statuses #3157 (JuanCrg90)
- Fix DB-specific, query-related exceptions #3156 (aitbw)
- Convert Tax Categories to discard #3154 (kennyadsl)
- Don't run validations in Order#record_ip_address #3145 (cedum)
- Align some deprecation messages in Order model #3135 (elia)
- Refactor order #refund_total #3134 (twist900)
- Remove code setter/getter from Spree::Promotion #3127 (kennyadsl)
- Do not allow successful checkout when order has only a void payment #3123 (spaghetticode)
- Add a stock locations filter configurable class #3116 (kennyadsl)
- Add migration to drop table/column from
20180710170104
#3114 (spaghetticode) - Fix migration
20161123154034
and20120411123334
#3113 (spaghetticode) - Remove destructive actions from migration 20180710170104 #3109 (spaghetticode)
- Fix remove code from promotions migration #3108 (kennyadsl)
- Fixing inventory unit finalizer #3094 (seand7565)
- Parameterize taxon's permalink also on update #3090 (loicginoux)
- Exclude line item additional taxes from unit cancel adjustment amount #3072 (mdesantis)
- Products at multiple Stock Locations appear as unique variants #3063 (mayanktap)
- Verify ownership of payment_source when creating WalletPaymentSource #3007 (ericsaupe)
- Remove user prereq from First Order promorule #2928 (fastjames)
- Remove belongs_to :return_authorization from InventoryUnit #2753 (snarfmason)
- Improve pricing options flexibility #2504 (softr8)
Backend
- Use
.take
in admin promotion index template #3224 (DianeLooney) - Remove unused variable assignment from Admin::OrdersController#index action #3170 (aitbw)
- Remove conditional when searching an order when creating a shipment #3169 (aitbw)
- Disable adjust stock field when user does not have the correct permission #3163 (seand7565)
- Fix stock item form to allow changing backorder value #3159 (kennyadsl)
- Promotion start/expiration times #3158 (aldesantis)
- Hide Master Price input when there's no default price #3155 (kennyadsl)
- When editing prices keep the currency locked. #3150 (peterberkenbosch)
- Hide link to delete users if they have orders #3139 (aitbw)
- Count only users completed orders in admin users page #3125 (brchristian)
- Remove unnecessary decimal conversion #3124 (brchristian)
- Set mininum line item quantity in admin cart #3115 (mamhoff)
- Adding else statement back in to show weight and dimensions on no-var… #3112 (seand7565)
- Admin payments UI cleanup #3101 (tvdeyen)
- Fix fieldset legend position in Firefox #3100 (tvdeyen)
- Add tests for locale switch on backend #3083 (coorasse)
- Add countries to state selection for zones #3037 (jacobherrington)
API
- Improve jbuilder serialization for Oj gem #3210 (kennyadsl)
- More error codes to apply_coupon_code api response #3193 (fkoessler)
Frontend
Deprecations
- Deprecate @payment_sources ivar in checkout controller #3128 (kennyadsl)
- Deprecate core tasks and migration scripts #3080 (kennyadsl)
Misc
- Move Spree::AppConfiguration specs from app/ to lib/ #3238 (kennyadsl)
- Add a Sponsor button to our repository #3228 (kennyadsl)
- Improve JS linting, pt. 2 #3225 (aitbw)
- Improve JS linting #3212 (aitbw)
- Add basic tooling for JS linting #3167 (aitbw)
- Use a rails application template for Heroku + example-app #3206 (elia)
- Eval the custom Gemfile with file and line number #3204 (elia)
- Improve translation #3200 (spaghetticode)
- Increase Capybara window width size #3171 (aitbw)
- Enable extension developers to customize the namespace #3161 (mdesantis)
- Fix flaky specs around admin credit card filling #3160 (kennyadsl)
- Ensure return from CSS function #3146 (fastjames)
- Add missing I18n namespace #3144 (aitbw)
- Tentative fix for flaky specs #3141 (kennyadsl)
- Remove Devise translations #3132 (aitbw)
- Tenative fix for flaky spec #3110 (spaghetticode)
- Enable Docker for demoing purposes #3106 (kinduff)
- Fix sed call so it works on mac #3091 (peterberkenbosch)
- Fix flaky specs in
backend/spec/features/admin/users_spec.rb
#3089 (spaghetticode) - Lock sqlite3 version to 1.3 #3088 (mdesantis)
- Accept source as permitted attribute importing orders #3066 (jtapia)
- Testing tools improvements #3062 (kennyadsl)
- Add gem-release #3060 (kennyadsl)
- Normalize API I18n keys #2988 (aitbw)
Docs & Guides
- Document our governance model #3240 (aldesantis)
- Clarify README instructions for Sandbox #3231 (k1bs)
- Purify guides search terms before using them #3230 (kennyadsl)
- Add new Key Stakeholder in the README #3229 (davidedistefano)
- Bump fstream from 1.0.11 to 1.0.12 in /guides #3218 (dependabot)
- Add CodeTriage badge and fix OpenCollective badges links #3211 (mdesantis)
- Fix partner image #3203 (jarednorman)
- Add active merchant reference URL in Guides #3188 (jacquesporveau)
- Add promotion rules article for Solidus admins #3185 (benjaminwil)
- Update class methods to be instance methods. #3173 (jacquesporveau)
- Correct adjustment type application order in guide #3153 (BenAkroyd)
- Fix typo in "Addresses" developers guide #3147 (cedum)
- Update TaxLocation Namespace #3142 (JuanCrg90)
- Add Adjustment documentation reference links #3122 (JuanCrg90)
- Minor updates in promotions overview documentation #3121 (JuanCrg90)
- Add initial order documentation for end users #3105 (benjaminwil)
- Move misplaced end-user documentation #3104 (benjaminwil)
- Remove CHANGELOG entry from PR's template #3102 (kennyadsl)
- Update Solidus Guide footer #3097 (davidedistefano)
- Add support for multiple tables of contents in the Solidus Guides #3093 (kennyadsl)
- Add initial shipments documentation for end users #3092 (kennyadsl)
- Add payment state link in orders overview docs #3084 (JuanCrg90)
- Bug report template improvements #3069 (mdesantis)
- Improve Pull Request template #3058 (kennyadsl)
- Extend Decorator documentation #3045 (jacobherrington)
- Updating readme to include OpenCollective information #3042 (seand7565)
- Add documentation about taxons for end users #2760 (benjaminwil)