diff --git a/core/app/models/spree/user_last_url_storer.rb b/core/app/models/spree/user_last_url_storer.rb index 8aa7644b36c..01cbb1bd37c 100644 --- a/core/app/models/spree/user_last_url_storer.rb +++ b/core/app/models/spree/user_last_url_storer.rb @@ -26,7 +26,6 @@ def self.rules # or its subclasses. The controller will be passed to each rule for matching. def initialize(controller) @controller = controller - Spree::Deprecation.warn("This class will be removed without replacement on the release of Solidus 4.0") end # Stores into session[:spree_user_return_to] the request full path for diff --git a/core/lib/spree/core/controller_helpers/auth.rb b/core/lib/spree/core/controller_helpers/auth.rb index 35afa14534d..21125053918 100644 --- a/core/lib/spree/core/controller_helpers/auth.rb +++ b/core/lib/spree/core/controller_helpers/auth.rb @@ -37,12 +37,6 @@ def current_ability end def redirect_back_or_default(default) - Spree::Deprecation.warn <<~MSG - 'Please use #stored_spree_user_location_or when using solidus_auth_devise. - Otherwise, please utilize #redirect_back provided in Rails 5+ or - #redirect_back_or_to in Rails 7+ instead' - MSG - redirect_to(session["spree_user_return_to"] || default) session["spree_user_return_to"] = nil end @@ -57,11 +51,6 @@ def set_guest_token end def store_location - Spree::Deprecation.warn <<~MSG - store_location is being deprecated in solidus 4.0 - without replacement - MSG - Spree::UserLastUrlStorer.new(self).store_location end diff --git a/core/spec/lib/spree/core/controller_helpers/auth_spec.rb b/core/spec/lib/spree/core/controller_helpers/auth_spec.rb index 5087a0878ed..9a127472c83 100644 --- a/core/spec/lib/spree/core/controller_helpers/auth_spec.rb +++ b/core/spec/lib/spree/core/controller_helpers/auth_spec.rb @@ -17,7 +17,7 @@ def index; render plain: 'index'; end describe '#redirect_back_or_default' do before do def controller.index - Spree::Deprecation.silence { redirect_back_or_default('/') } + redirect_back_or_default('/') end end @@ -30,11 +30,6 @@ def controller.index get :index expect(response).to redirect_to('/') end - - it 'is deprecated' do - expect(Spree::Deprecation).to receive(:warn) - get :index - end end describe '#set_guest_token' do @@ -74,7 +69,7 @@ def controller.index describe '#store_location' do it 'sets session return url' do allow(controller).to receive_messages(request: double(fullpath: '/redirect')) - Spree::Deprecation.silence { controller.store_location } + controller.store_location expect(session[:spree_user_return_to]).to eq '/redirect' end end diff --git a/core/spec/models/spree/user_last_url_storer_spec.rb b/core/spec/models/spree/user_last_url_storer_spec.rb index 8e0ad252947..aa3c7794583 100644 --- a/core/spec/models/spree/user_last_url_storer_spec.rb +++ b/core/spec/models/spree/user_last_url_storer_spec.rb @@ -27,11 +27,6 @@ def self.match?(_controller) described_class.rules.delete('CustomRule') end - it 'is deprecated' do - expect(Spree::Deprecation).to receive(:warn) - described_class.new(controller) - end - describe '::rules' do it 'includes default rules' do rule = Spree::UserLastUrlStorer::Rules::AuthenticationRule @@ -48,7 +43,7 @@ def self.match?(_controller) context 'when at least one rule matches' do it 'does not set the path value into the session' do described_class.rules << CustomRule - Spree::Deprecation.silence { subject.store_location } + subject.store_location expect(session[:spree_user_return_to]).to be_nil end end @@ -57,7 +52,7 @@ def self.match?(_controller) it 'sets the path value into the session' do described_class.rules << CustomRule described_class.rules.delete('CustomRule') - Spree::Deprecation.silence { subject.store_location } + subject.store_location expect(session[:spree_user_return_to]).to eql fullpath end end