Problem/Motivation
With Drupal 10.2, I found this deprecation message in logs:
Using a translatable string as a category for field type is deprecated in drupal:10.2.0 and is removed from drupal:11.0.0. See https://www.drupal.org/node/3364271
Steps to reproduce
Check the following file: src/Plugin/Field/FieldType/WebformEntityReferenceItem.php
/**
* Defines the 'webform_entity_reference' entity field type.
*
* Extends EntityReferenceItem and only support targeting webform entities.
*
* @FieldType(
* id = "webform",
* label = @Translation("Webform"),
* description = @Translation("A webform containing default submission values."),
* category = @Translation("Reference"),
* default_widget = "webform_entity_reference_select",
* default_formatter = "webform_entity_reference_entity_view",
* list_class = "\Drupal\webform\Plugin\Field\FieldType\WebformEntityReferenceFieldItemList",
* )
*/
Proposed resolution
Fix it according to https://www.drupal.org/node/3375748
Remaining tasks
User interface changes
API changes
Data model changes
Comments
Comment #2
abhishek_gupta1 commentedComment #3
abhishek_gupta1 commented@paulabg , I have fixed the issue and created patch.
Comment #6
mitrpaka commentedAdded a backwards compatibility layer for Drupal 10.1 and previous versions as Webform 6.2.x works with Drupal: ^9.4 || ^10.
Comment #8
jrockowitz commentedThis type of issue will most likely be automatically fixed by Drupal RectorI am wrong about this being automated.
Comment #9
paulabg commented@abhishek_gupta1 I created before this MR: https://git.drupalcode.org/project/webform/-/merge_requests/412
Comment #10
jrockowitz commentedCould we please use the same version detection logic used through out the module.
Comment #11
mitrpaka commentedComment #12
jrockowitz commented