Skip to content

Deprecate convert_based_near_to_attributes in favor of nested_attributes flag #1194

Description

@laritakr

Summary

Bulkrax::ValkyrieObjectFactory#convert_based_near_to_attributes was added before the generalized nested_attributes: true mapping flag existed. With the flag in place (#1193), the hardcoded translator can be retired in favor of a declarative mapping option.

Proposed steps

  1. Add a deprecation warning to convert_based_near_to_attributes that fires when the translator actually runs and points users at the flag: "based_near translation via the hardcoded factory method is deprecated; declare nested_attributes: true in your based_near field mapping. This translator will be removed in Bulkrax 10.0."
  2. Update Bulkrax-shipped default mappings (and any test app/fixtures) to include nested_attributes: true on based_near so they stop tripping the warning.
  3. Document the migration path in the README/wiki: any custom Bulkrax mapping for based_near should add nested_attributes: true ahead of the next major release.
  4. In the next major Bulkrax release, remove convert_based_near_to_attributes and the call site in transform_attributes.

Why now (a follow-up, not part of #1193)

The PR introducing the flag is intentionally scoped to "add the flag" so it can land cleanly. Migrating based_near is a behavior change for any adopter whose mapping doesn't yet declare the flag — keeping it separate gives that change its own discussion and release cadence.

Acceptance criteria

  • Deprecation warning fires when the translator translates non-empty values, naming the flag.
  • Bulkrax's own default mappings declare nested_attributes: true for based_near.
  • Migration note in the README or wiki.
  • Tracking ticket for the eventual removal in Bulkrax 10.0.

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