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 21, 2022
1 parent 1e70a59 commit 9ed98fe
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 @@ -90,6 +90,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 9ed98fe

Please sign in to comment.