Skip to content

WA-RAILS7-008: Update ActiveSupport::Deprecation.new for Rails 7.1+ #700

@kitcommerce

Description

@kitcommerce

Summary

In Rails 7.1, ActiveSupport::Deprecation.new was changed — the global deprecation instance was removed and per-gem deprecators are preferred. Workarea creates its own deprecation instance:

# core/lib/workarea.rb:183
@deprecation ||= ActiveSupport::Deprecation.new('3.6', 'Workarea')

This works on Rails 7.0 but the API changed in 7.1 where ActiveSupport::Deprecation behavior differs.

Approach

Use ActiveSupport::Deprecation._instance pattern for Rails < 7.1, and Rails.application.deprecators[:workarea] for Rails 7.1+.

Objective

Make Workarea's deprecation system work on Rails 7.1+.

Client impact

None — internal deprecation tooling.

Acceptance Criteria

  • Deprecation warnings emit correctly on both Rails 6.1 and 7.1
  • Tests pass

Verification Plan

  1. Trigger a known deprecation warning and verify output format
  2. Run test suite

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions