Skip to content

armgit / spree

Public Imported from GitHub
0

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.

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.rb
index 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 Spree
def 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: {}
DEPRECATION
process_spree_action(action, parameters, session, flash, 'GET')
@@ -18,7 +18,7 @@ module Spree
# Executes a request simulating POST HTTP method and set/volley the response
def 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: {}
DEPRECATION
process_spree_action(action, parameters, session, flash, 'POST')
@@ -27,7 +27,7 @@ module Spree
# Executes a request simulating PUT HTTP method and set/volley the response
def 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: {}
DEPRECATION
process_spree_action(action, parameters, session, flash, 'PUT')
@@ -36,7 +36,7 @@ module Spree
# # Executes a request simulating PATCH HTTP method and set/volley the response
def 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: {}
DEPRECATION
process_spree_action(action, parameters, session, flash, 'PATCH')
@@ -45,7 +45,7 @@ module Spree
# Executes a request simulating DELETE HTTP method and set/volley the response
def 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: {}
DEPRECATION
process_spree_action(action, parameters, session, flash, 'DELETE')
@@ -53,35 +53,35 @@ module Spree
def 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.
DEPRECATION
process_spree_xhr_action(action, parameters, session, flash, :get)
end
def 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.
DEPRECATION
process_spree_xhr_action(action, parameters, session, flash, :post)
end
def 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.
DEPRECATION
process_spree_xhr_action(action, parameters, session, flash, :put)
end
def 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.
DEPRECATION
process_spree_xhr_action(action, parameters, session, flash, :patch)
end
def 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.
DEPRECATION
process_spree_xhr_action(action, parameters, session, flash, :delete)
end
diff --git a/frontend/app/helpers/spree/taxons_helper.rb b/frontend/app/helpers/spree/taxons_helper.rb
index 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.
DEPRECATION
products = taxon.active_products.distinct.select('spree_products.*, spree_products_taxons.position').limit(max)