Open Source Platform for DTC, B2B Commerce, Marketplaces & Omnichannel. REST APIs, TypeScript SDKs, and production-ready Next.js storefront. Self-host it. Own your data. No vendor lock-in. Zero platform fees.
Ruby b2b-commercee-commerceecommerceecommerce-apiecommerce-frameworkecommerce-platformheadlessheadless-commerceheadless-ecommercemarketplacemulti-tenantmulti-vendormulti-vendor-ecommerceopen-sourcespree-commerce
Fix deprecation warnings, give more time developers to adjust
Damian Legawiec79fe5318be3b
diff --git a/core/lib/spree/testing_support/controller_requests.rb b/core/lib/spree/testing_support/controller_requests.rbindex 8db4921194..efae8c208e 100644--- a/core/lib/spree/testing_support/controller_requests.rb+++ b/core/lib/spree/testing_support/controller_requests.rb@@ -9,7 +9,7 @@ module Spreedef spree_get(action, parameters = nil, session = nil, flash = nil)ActiveSupport::Deprecation.warn(<<-DEPRECATION, caller)- ControllerRequests#spree_get is deprecated and will be removed in Spree 4.1.+ ControllerRequests#spree_get is deprecated and will be removed in Spree 5.0.Please use get, params: {}DEPRECATIONprocess_spree_action(action, parameters, session, flash, 'GET')@@ -18,7 +18,7 @@ module Spree# Executes a request simulating POST HTTP method and set/volley the responsedef spree_post(action, parameters = nil, session = nil, flash = nil)ActiveSupport::Deprecation.warn(<<-DEPRECATION, caller)- ControllerRequests#spree_post is deprecated and will be removed in Spree 4.1.+ ControllerRequests#spree_post is deprecated and will be removed in Spree 5.0.Please use post, params: {}DEPRECATIONprocess_spree_action(action, parameters, session, flash, 'POST')@@ -27,7 +27,7 @@ module Spree# Executes a request simulating PUT HTTP method and set/volley the responsedef spree_put(action, parameters = nil, session = nil, flash = nil)ActiveSupport::Deprecation.warn(<<-DEPRECATION, caller)- ControllerRequests#spree_put is deprecated and will be removed in Spree 4.1.+ ControllerRequests#spree_put is deprecated and will be removed in Spree 5.0.Please use put, params: {}DEPRECATIONprocess_spree_action(action, parameters, session, flash, 'PUT')@@ -36,7 +36,7 @@ module Spree# # Executes a request simulating PATCH HTTP method and set/volley the responsedef spree_patch(action, parameters = nil, session = nil, flash = nil)ActiveSupport::Deprecation.warn(<<-DEPRECATION, caller)- ControllerRequests#spree_patch is deprecated and will be removed in Spree 4.1.+ ControllerRequests#spree_patch is deprecated and will be removed in Spree 5.0.Please use patch, params: {}DEPRECATIONprocess_spree_action(action, parameters, session, flash, 'PATCH')@@ -45,7 +45,7 @@ module Spree# Executes a request simulating DELETE HTTP method and set/volley the responsedef spree_delete(action, parameters = nil, session = nil, flash = nil)ActiveSupport::Deprecation.warn(<<-DEPRECATION, caller)- ControllerRequests#spree_delete is deprecated and will be removed in Spree 4.1.+ ControllerRequests#spree_delete is deprecated and will be removed in Spree 5.0.Please use delete, params: {}DEPRECATIONprocess_spree_action(action, parameters, session, flash, 'DELETE')@@ -53,35 +53,35 @@ module Spreedef spree_xhr_get(action, parameters = nil, session = nil, flash = nil)ActiveSupport::Deprecation.warn(<<-DEPRECATION, caller)- ControllerRequests#spree_xhr_get is deprecated and will be removed in Spree 4.1.+ ControllerRequests#spree_xhr_get is deprecated and will be removed in Spree 5.0.DEPRECATIONprocess_spree_xhr_action(action, parameters, session, flash, :get)enddef spree_xhr_post(action, parameters = nil, session = nil, flash = nil)ActiveSupport::Deprecation.warn(<<-DEPRECATION, caller)- ControllerRequests#spree_xhr_post is deprecated and will be removed in Spree 4.1.+ ControllerRequests#spree_xhr_post is deprecated and will be removed in Spree 5.0.DEPRECATIONprocess_spree_xhr_action(action, parameters, session, flash, :post)enddef spree_xhr_put(action, parameters = nil, session = nil, flash = nil)ActiveSupport::Deprecation.warn(<<-DEPRECATION, caller)- ControllerRequests#spree_xhr_put is deprecated and will be removed in Spree 4.1.+ ControllerRequests#spree_xhr_put is deprecated and will be removed in Spree 5.0.DEPRECATIONprocess_spree_xhr_action(action, parameters, session, flash, :put)enddef spree_xhr_patch(action, parameters = nil, session = nil, flash = nil)ActiveSupport::Deprecation.warn(<<-DEPRECATION, caller)- ControllerRequests#spree_xhr_patch is deprecated and will be removed in Spree 4.1.+ ControllerRequests#spree_xhr_patch is deprecated and will be removed in Spree 5.0.DEPRECATIONprocess_spree_xhr_action(action, parameters, session, flash, :patch)enddef spree_xhr_delete(action, parameters = nil, session = nil, flash = nil)ActiveSupport::Deprecation.warn(<<-DEPRECATION, caller)- ControllerRequests#spree_xhr_delete is deprecated and will be removed in Spree 4.1.+ ControllerRequests#spree_xhr_delete is deprecated and will be removed in Spree 5.0.DEPRECATIONprocess_spree_xhr_action(action, parameters, session, flash, :delete)enddiff --git a/frontend/app/helpers/spree/taxons_helper.rb b/frontend/app/helpers/spree/taxons_helper.rbindex 146618387b..c39c5fcacd 100644--- a/frontend/app/helpers/spree/taxons_helper.rb+++ b/frontend/app/helpers/spree/taxons_helper.rb@@ -5,7 +5,7 @@ module Spree# to show the most popular products for a particular taxon (that is an exercise left to the developer.)def taxon_preview(taxon, max = 4)ActiveSupport::Deprecation.warn(<<-DEPRECATION, caller)- TaxonsHelper is deprecated and will be removed in Spree 4.2.+ TaxonsHelper is deprecated and will be removed in Spree 5.0.Please remove any `helper 'spree/taxons'` from your controllers.DEPRECATIONproducts = taxon.active_products.distinct.select('spree_products.*, spree_products_taxons.position').limit(max)