Problem/Motivation

Steps to reproduce

- Create Functional test
- Enable simplenews module in test
- Observe deprecation warnings

Proposed resolution

Remove @Translation annotation from TinyListIntegerItem field type

User interface changes

None

API changes

None

Data model changes

None

Issue fork simplenews-3410208

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

kbrodej created an issue. See original summary.

kbrodej’s picture

Status: Active » Needs review
berdir’s picture

Status: Needs review » Needs work

This can only be done when the project requires 10.2, otherwise it breaks functionality on lower versions.

And it's not just about removing the translate class, categories are machine names now, so it will need to be decided where this fits in the new category system.

himanshu_jhaloya’s picture

Assigned: Unassigned » himanshu_jhaloya
StatusFileSize
new722 bytes

Hi,
To maintain compatibility, where categories are represented by machine names, you can define a custom category and use its machine name.

himanshu_jhaloya’s picture

Assigned: himanshu_jhaloya » Unassigned
Status: Needs work » Needs review
ressa’s picture

Status: Needs review » Needs work

Thanks @himanshu_jhaloya. Manually attaching patches is being phased out, so perhaps you can create a patch and Merge Request with the Gitlab integration.

DrupalCI and all patch testing will be turned off on July 1, 2024

Already today, from the test page for this issue:

DrupalCI console output and artifacts are no longer available from dispatcher.drupalci.org. Use GitLab CI instead

adamps’s picture

Category: Bug report » Task
Status: Needs work » Postponed

Postponed until June 2024 when support for D10.1 ends - see #4

berdir’s picture

Status: Postponed » Needs work

That's tricky because EOL for 10.1 might also be when 11.0 gets released (yep, that soon already).

This is what we did in entity_reference_revisions:

/**
 * Implements hook_field_info_alter().
 */
function entity_reference_revisions_field_info_alter(&$info) {

  if (version_compare(\Drupal::VERSION, '10.1.999', '<')) {
    $info['entity_reference_revisions']['category'] = t('Reference revisions');
  }

}

So put the new category into the annotation and then switch back in the info hook.

But looking again at the change, this is even easier. this is no_ui field type, the category was just copy pasted but is useless here as it is, per no_ui = TRUE, never actually shown in the UI.

So, just remove the category, problem solved.

adamps’s picture

Title: Using a translatable string as a category for field type is deprecated in drupal:10.2.0 » Using a translatable string as a category for field type is deprecated in drupal:10.2.0
Status: Needs work » Needs review
StatusFileSize
new686 bytes

Thanks @Berdir let's try it

adamps’s picture

Please can someone review/confirm that this fixes the problem?

> Manually attaching patches is being phased out, so perhaps you can create a patch and Merge Request with the Gitlab integration.

Yes but it's not currently working unfortunately see #3395901: Use Gitlab CI in Simplenews

berdir’s picture

Status: Needs review » Reviewed & tested by the community

Should be OK IMHO. Didn't test, but there's really not much that you can test as it doesn't show up anywhere ;)

ressa’s picture

> Manually attaching patches is being phased out, so perhaps you can create a patch and Merge Request with the Gitlab integration.

Yes but it's not currently working unfortunately see #3395901: Use Gitlab CI in Simplenews

Ah yes ... it's a race against time now, since DrupalCI and all patch testing will be turned off on July 1, 2024.

If it isn't created already, someone should create a meta "support group" issue for module maintainers struggling with the transition to Gitlab CI tests :)

berdir’s picture

There's the #gitlab channel on Slack for asking questions, but this might be a bit too advanced for that.

FWIW, this doesn't prevent creating merge requests, they still run DrupalCI tests as well.

  • AdamPS committed b3b6ba19 on 4.x
    Issue #3410208 by AdamPS, himanshu_jhaloya, Berdir: Using a translatable...
adamps’s picture

Status: Reviewed & tested by the community » Fixed
Issue tags: -Drupal 10.2 compatibility +Drupal 11 compatibility

Great thanks

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.