Skip to content

Commit

Permalink
Deprecate usage of legacy event system
Browse files Browse the repository at this point in the history
Once we've the upgrade guide complete, we'll update the message with a
link to it.
  • Loading branch information
waiting-for-dev committed Apr 15, 2022
1 parent e1bb9dc commit c4c34b4
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions core/lib/spree/core/engine.rb
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,16 @@ class Engine < ::Rails::Engine
Spree::UsersController.protect_from_forgery with: :exception
end
end

config.after_initialize do
if Spree::Config.use_legacy_events && !ENV['CI']
Spree::Deprecation.warn <<~MSG
Your Solidus store is using the legacy event system. You're
encouraged to switch to the new event bus. After you're done, you
can remove the `use_legacy_events` setting from `spree.rb`.
MSG
end
end
end
end
end

0 comments on commit c4c34b4

Please sign in to comment.