Problem/Motivation

Every Commerce plugin type supports both attributes and annotations. Drupal core already deprecates annotated plugins for plugin types that support attributes, but nothing tells developers when Commerce itself will stop discovering annotated plugins.

Proposed resolution

Mark all Commerce plugin annotation classes as @deprecated in commerce:4.0.0 and is removed from commerce:5.0.0, pointing to the matching attribute class:

  • commerce: CommerceCondition, CommerceEntityTrait, CommerceInlineForm
  • commerce_checkout: CommerceCheckoutFlow, CommerceCheckoutPane
  • commerce_number_pattern: CommerceNumberPattern
  • commerce_payment: CommercePaymentGateway, CommercePaymentMethodType, CommercePaymentType
  • commerce_promotion: CommercePromotionOffer
  • commerce_tax: CommerceTaxType, CommerceTaxNumberType

Annotated plugins keep working throughout 4.x.

Remaining tasks

  • Write a change record explaining how to convert Commerce plugins to attributes.
  • Add the deprecations.

User interface changes

None.

API changes

Commerce plugin annotation classes are deprecated.

Data model changes

None.

Comments

jsacksick created an issue.