Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[v4.1] Deprecate Spree::Deprecation in favor of Spree.deprecator #6103

Merged
merged 4 commits into from
Feb 12, 2025

Conversation

mamhoff
Copy link
Contributor

@mamhoff mamhoff commented Feb 7, 2025

Backport

This will backport the following commits from main to v4.1:

Questions ?

Please refer to the Backport tool documentation

kennyadsl and others added 4 commits February 7, 2025 14:12
See https://github.com/rails/rails/blob/814f8ee068814e3d4832a607f49f155e02a609c0/activesupport/lib/active_support/deprecation.rb#L6-L34

Add Spree.deprecator to the list of app deprecators as suggested by
Rails, this will allow applying the global deprecation configurations
to our engine deprecations as well.

Eg:

    config.active_support.deprecation = :raise

This will set the deprecation behavior to raise an exception on any of
the deprecators under `Rails.application.deprecators`.

(cherry picked from commit 44d20af)
(cherry picked from commit e822f3f)

# Conflicts:
#	backend/app/controllers/spree/admin/stock_items_controller.rb
#	backend/app/helpers/spree/admin/navigation_helper.rb
#	backend/app/views/spree/admin/shared/_product_sub_menu.html.erb
#	backend/app/views/spree/admin/shared/_promotion_sub_menu.html.erb
#	backend/app/views/spree/admin/shared/_settings_sub_menu.html.erb
#	backend/lib/spree/backend_configuration/deprecated_tab_constants.rb
#	backend/lib/spree/backend_configuration/menu_item.rb
#	backend/spec/helpers/admin/navigation_helper_spec.rb
#	backend/spec/lib/spree/backend_configuration/menu_item_spec.rb
#	backend/spec/lib/spree/backend_configuration_spec.rb
#	core/app/models/spree/adjustment.rb
#	core/lib/spree/deprecation.rb
Use autoload to print a deprecation only if the constant is loaded.

(cherry picked from commit 848bf9f)

# Conflicts:
#	core/lib/spree/deprecation.rb
@mamhoff mamhoff requested a review from a team as a code owner February 7, 2025 13:43
@github-actions github-actions bot added changelog:solidus_core Changes to the solidus_core gem changelog:repository Changes to the repository not within any gem labels Feb 7, 2025
Copy link

codecov bot commented Feb 7, 2025

Codecov Report

Attention: Patch coverage is 55.55556% with 16 lines in your changes missing coverage. Please review.

Project coverage is 88.70%. Comparing base (b699a84) to head (cd9b8ca).
Report is 5 commits behind head on v4.1.

Files with missing lines Patch % Lines
...re/lib/spree/deprecated_instance_variable_proxy.rb 41.17% 10 Missing ⚠️
core/lib/spree/deprecation.rb 0.00% 3 Missing ⚠️
...lib/generators/spree/dummy/templates/rails/test.rb 0.00% 1 Missing ⚠️
core/lib/spree/core/engine.rb 66.66% 1 Missing ⚠️
.../lib/spree/testing_support/silence_deprecations.rb 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             v4.1    #6103      +/-   ##
==========================================
- Coverage   88.74%   88.70%   -0.05%     
==========================================
  Files         563      564       +1     
  Lines       13885    13896      +11     
==========================================
+ Hits        12322    12326       +4     
- Misses       1563     1570       +7     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@kennyadsl kennyadsl merged commit 5ff8ca1 into solidusio:v4.1 Feb 12, 2025
9 of 11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog:repository Changes to the repository not within any gem changelog:solidus_core Changes to the solidus_core gem
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants