Skip to content

Deprecate Spree::Deprecation in favor of Spree.deprecator#5289

Merged
elia merged 4 commits intosolidusio:mainfrom
nebulab:kennyadsl/deprecation-updates
Sep 27, 2023
Merged

Deprecate Spree::Deprecation in favor of Spree.deprecator#5289
elia merged 4 commits intosolidusio:mainfrom
nebulab:kennyadsl/deprecation-updates

Conversation

@kennyadsl
Copy link
Member

@kennyadsl kennyadsl commented Jul 28, 2023

Summary

After rails/rails#47354, the suggested usage of ActiveSupport::Deprecation has changed and this PR changes our code to reflect that.

TODO:

Checklist

Check out our PR guidelines for more details.

The following are mandatory for all PRs:

The following are not always needed:

  • 📖 I have updated the README to account for my changes.
  • 📑 I have documented new code with YARD.
  • 🛣️ I have opened a PR to update the guides.
  • ✅ I have added automated tests to cover my changes.
  • 📸 I have attached screenshots to demo visual changes.

@kennyadsl kennyadsl self-assigned this Jul 28, 2023
@github-actions github-actions bot added changelog:solidus_backend Changes to the solidus_backend gem changelog:solidus_core Changes to the solidus_core gem labels Jul 28, 2023
@elia elia self-assigned this Sep 25, 2023
@elia elia force-pushed the kennyadsl/deprecation-updates branch from 798f565 to 6913c87 Compare September 25, 2023 16:45
@elia elia added this to the 4.2 milestone Sep 25, 2023
@elia elia force-pushed the kennyadsl/deprecation-updates branch from 6913c87 to d7b817b Compare September 26, 2023 13:46
@github-actions github-actions bot added the changelog:repository Changes to the repository not within any gem label Sep 26, 2023
@elia elia requested a review from rainerdema September 26, 2023 14:00
@elia elia changed the title Update Deprecation usage to accomodate Rails 7.1 changes Deprecate Spree::Deprecation in favor of Spree.deprecator Sep 26, 2023
@elia elia removed the changelog:repository Changes to the repository not within any gem label Sep 26, 2023
@elia elia marked this pull request as ready for review September 26, 2023 14:01
@elia elia requested a review from a team as a code owner September 26, 2023 14:01
@elia elia force-pushed the kennyadsl/deprecation-updates branch from d7b817b to d928053 Compare September 27, 2023 07:50
@github-actions github-actions bot added the changelog:repository Changes to the repository not within any gem label Sep 27, 2023
@elia elia requested a review from jarednorman September 27, 2023 09:08
@elia elia force-pushed the kennyadsl/deprecation-updates branch from d928053 to fddb31f Compare September 27, 2023 09:29
kennyadsl and others added 4 commits September 27, 2023 11:31
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`.
Use autoload to print a deprecation only if the constant is loaded.
@elia elia force-pushed the kennyadsl/deprecation-updates branch from fddb31f to a7dd17b Compare September 27, 2023 09:33
Copy link
Contributor

@rainerdema rainerdema left a comment

Choose a reason for hiding this comment

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

👍

@elia elia merged commit 556d11c into solidusio:main Sep 27, 2023
@elia elia deleted the kennyadsl/deprecation-updates branch September 27, 2023 13:17
@elia elia added changelog:repository Changes to the repository not within any gem and removed changelog:repository Changes to the repository not within any gem labels Sep 27, 2023
@kennyadsl kennyadsl added the backport-v4.1 Backport this pull-request to v4.1 label Feb 6, 2025
@github-actions
Copy link

github-actions bot commented Feb 6, 2025

💔 All backports failed

Status Branch Result
v4.1 Backport failed because of merge conflicts

Manual backport

To create the backport manually run:

backport --pr 5289

Questions ?

Please refer to the Backport tool documentation and see the Github Action logs for details

@mamhoff
Copy link
Contributor

mamhoff commented Feb 7, 2025

💚 All backports created successfully

Status Branch Result
v4.1

Questions ?

Please refer to the Backport tool documentation

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport-v4.1 Backport this pull-request to v4.1 changelog:repository Changes to the repository not within any gem changelog:solidus_backend Changes to the solidus_backend gem changelog:solidus_core Changes to the solidus_core gem

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants