Problem/Motivation
When you run a Functional test extending `BrowserTestBase` you can see there's an advice about the use of `@FieldWidget` annotation saying that it's deprecated
Steps to reproduce
1. Create a functional test extending `BrowserTestBase`
2. Create a test that uses inline_entity_form
3. Launch the test
4. You'll see the advice on the console `Using @FieldWidget annotation for plugin with ID inline_entity_form_simple is deprecated and is removed from drupal:13.0.0. Use a Drupal\Core\Field\Attribute\FieldWidget attribute instead. See https://www.drupal.org/node/3395575`
Proposed resolution
Replace the annotation `@FieldWidget` by attributes
Remaining tasks
Create a MR with the change
Issue fork inline_entity_form-3592475
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
Comment #3
luismagr commentedComment #4
luismagr commentedComment #5
bluegeek9 commentedThis will make the minimum supported version 10.2.0
Comment #6
bluegeek9 commentedComment #7
bluegeek9 commentedI restored the annotation but kept the attributes
I also added unit and kernel tests.
Comment #8
dwwComment #10
dwwWow, I opened the MR expecting a tiny diff, and instead found:
🤯 What's happening? Is that all LLM-generated test code? If so, you need to disclose usage. Did you review any of it? Is any of it in scope with the stated change? If we have any existing coverage of the widget, this change should work or not and our current tests would notice.
I rebased from the latest 3.x, and left off that final commit. For the 3.x branch, we don't care about anything older than D11.3, so we can already remove the annotation entirely. Now the changes tab in the MR is viable:
I don't know if we even want a 3.0.x MR that only adds the attribute and leaves the annotations. Not sure I care about deprecations there.
Comment #11
dwwComment #13
dwwMerged to 3.x. Thanks!