Problem/Motivation
There are only two remaining functions in field.module, let's move them and deprecate.
Proposed resolution
field_form_field_config_edit_form_entity_builder() -> move to a method on FieldConfigEditForm
It is the only place it is used and contrib does not use it.
_field_create_entity_from_ids() -> move to an internal helper in ContentEntityStorageBase and deprecate it with no replacement.
Remaining tasks
Review.
Issue fork drupal-3572173
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 #2
ben280398 commentedWorking on this
Comment #3
nicxvan commentedThis is not ready either sorry. We still need confirmation on the plan.
Comment #6
amateescu commentedUpdated the plan and posted a MR :)
Comment #7
claudiu.cristeaLeft some remarks
Comment #8
amateescu commentedFixed review points and the tests.
Comment #9
nicxvan commentedThis looks great now, I think all feedback has been addressed.
I did a review over slack on the deprecations and changing the form callbacks allowing DI.
Comment #10
berdirAdded two suggestions.
Comment #11
nicxvan commentedAdded code suggestions for everything but the deprecation.
They could use a review before I apply them.
Comment #12
claudiu.cristeaComment #13
claudiu.cristeaLet's finish this
Comment #14
claudiu.cristeaSo far...
Ready for review
Comment #15
nicxvan commentedOne question on the merge request
Comment #16
nicxvan commentedThere are a couple of open comments.
Comment #17
claudiu.cristeaAddressed remarks. The change record was added in #14.
Ready for a new round of review
Comment #18
claudiu.cristeaSince #17 I've addressed a missed review remark.
Comment #19
nicxvan commentedI think this is ready, the last comment on the MR is addressed in #3580424: Stale references to defunct functions in field module.
I reviewed all of the commits since the ones I applied and I think all feedback has been addressed.
Comment #20
amateescu commentedWent through the MR and it looks great! Left a code suggestion on the form constructor change because I can't see why we wouldn't use property promotion there. Feel free to self-RTBC after handling that :)
Comment #21
nicxvan commentedChatted in slack, that was intentional since it makes contrib BC harder, we just add property promotion for it when we drop the deprecation.
Comment #23
amateescu commentedEven though I started this MR originally, enough people have reviewed and worked on it since, so I'm comfortable merging it :)
Committed fcb3dff and pushed to main. Will need a reroll for 11.x..
Comment #25
amateescu commented\Drupal\Tests\node\Functional\NodeCreationTest::testAuthoredDate()fails consistently on CI as well as locally, but I think that's a problem with that specific test than the backport MR.In any case, I'd prefer not breaking HEAD on my second day, so let's wait a bit until we can figure out the issue.
Comment #27
amateescu commentedThe test passes now both on CI and my local, must've been a time issue.
Committed 22d7c62 and pushed to 11.x. Thanks!