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.

Deprecate Spree::Classifications::Reposition for Spree 5.5 (#13645)

Damian Legawiec3889f065a36b
diff --git a/spree/core/app/services/spree/classifications/reposition.rb b/spree/core/app/services/spree/classifications/reposition.rb
index 7490679b27..f04f01bc9c 100644
--- a/spree/core/app/services/spree/classifications/reposition.rb
+++ b/spree/core/app/services/spree/classifications/reposition.rb
@@ -1,9 +1,14 @@
module Spree
module Classifications
+ # @deprecated This service is deprecated and will be removed in Spree 5.5.
class Reposition
prepend Spree::ServiceModule::Base
def call(classification:, position:)
+ Spree::Deprecation.warn(
+ "#{self.class.name} is deprecated and will be removed in Spree 5.5.",
+ caller_locations(2)
+ )
if position.is_a?(String) && !position.match(/^\d+$/)
return failure(nil, I18n.t('errors.messages.not_a_number'))
end