Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Unreleased
----------

- Fix engine initialization [#2040](https://github.com/Shopify/shopify_app/pull/2040)

- Fix deprecation warnings for Rails 7.1+ [#2041](https://github.com/Shopify/shopify_app/pull/2041)

23.0.0 (December 11, 2025)
----------
Expand Down
6 changes: 5 additions & 1 deletion lib/shopify_app/logger.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,15 @@ def deprecated(message, version)

raise ShopifyAPI::Errors::FeatureDeprecatedError unless valid_version(version)

ActiveSupport::Deprecation.warn("[#{version}] #{context(:warn)} #{message}")
deprecator.warn("[#{version}] #{context(:warn)} #{message}")
end

private

def deprecator
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's mark this as private for consistency with the other helper methods

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, updated

@deprecator ||= ActiveSupport::Deprecation.new(ShopifyApp::VERSION, "ShopifyApp")
end

def context(log_level)
current_shop = ShopifyAPI::Context.active_session&.shop || "Shop Not Found"
"[ ShopifyApp | #{log_level.to_s.upcase} | #{current_shop} ]"
Expand Down