Problem/Motivation
See #3566536: [meta] eliminate core .module files
Proposed resolution
Convert _content_translation_install_field_storage_definitions() to a protected method and remove the procedural function. This is safe according to https://www.drupal.org/about/core/policies/core-change-policies/bc-polic...
Remaining tasks
None.
User interface changes
None.
Introduced terminology
None.
API changes
Deprecated:
TBD
Data model changes
None.
Issue fork drupal-3566890
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
claudiu.cristeaComment #4
nicxvan commentedThere is a deprecation being hit somewhere.
content_translation_language_configuration_element_process() is still being called directly.
Comment #5
nicxvan commentedComment #6
claudiu.cristeaThis is ready for review:
Comment #7
dcam commentedI left a couple of comments to consider.
You might need to add before/after examples to the two existing change records. I usually have to do it.
The addition of
ContentTranslationManager->access()might need a change record. Maybe https://www.drupal.org/node/3567484 can be edited to serve both purposes.Comment #8
claudiu.cristea@dcam, thank you for review.
It seems it was already in https://www.drupal.org/node/3567484.
Ready for a new round of review/
Comment #9
claudiu.cristeaReady for review, see my comment in #8.
Comment #10
dcam commentedThank you for considering my feedback.
I don't remember what I was thinking the other night when I wrote that comment. Maybe I thought that it needed its own change record separate from the deprecation or something. But it's OK the way it is now.
The new changes look good to me. RTBC.
Comment #12
claudiu.cristeaDetected usages of
_content_translation_install_field_storage_definitions(), https://git.drupalcode.org/search?group_id=2&scope=blobs&search=_content.... Let's deprecate it instead of deletingComment #13
claudiu.cristeaReady again for review.
Comment #14
berdirLeft a few minor notes.
There are existing issues about some of those functions, such as #2155787: Introduce more flexible access control for content translation operations but they are _very_ old. Still, I think we might want to give the new content_translation maintainer a chance to comment on this.
There's also #3497534: [meta] Clean up content_translation hooks and legacy files that @nicxvan created, that's also about restructuring the hooks *and* remaining functions, the hook part is still something we want to refactor, so we can repurpose that I think.
Comment #15
claudiu.cristeaI've tagged the issue with "Needs subsystem maintainer review" to get a feedback. I'll also notify @penyaskito
@nicxvan, could you, please, take a look at #3497534: [meta] Clean up content_translation hooks and legacy files and see what still stands there?
Comment #16
penyaskitore: #12: In contrib, there are 2 modules using it:
social_language_modules_installed, in the submodulesocial_languagefrom OpenSocial.Both are part of OpenSocial (so easy to ask for feedback if needed).
As this was underscore prefixed, not sure if we really need to deprecate: the impacted surface is quite low, and this was using the procedural PHP version of "hey this is a private function subject to change without notice".
I haven't reviewed the MR itself, so leaving the tag Needs subsystem maintainer review for now.
Comment #17
nicxvan commentedJust a heads up we've worked with the core committer team to come up with a policy since there are so many functions to manage as part of this initiative.
We will deprecate all functions, if they are underscore the removal is drupal 12.
Edited to add that the description of the deprecation decisions are in the parent issue.
Comment #18
nicxvan commentedI updated the deprecation versions, this needs a rebase.
Comment #19
claudiu.cristeaTests are green, ready for review.
Comment #20
nicxvan commentedI think this is pretty close, @penyaskito not sure if you've had a chance to review. I would also like to point out that I think @berdir added the tag so you could review whether we could deprecate and move the functions as is here of they should be addressed in the other issue.
In general we've been keeping the momentum and addressing them in issues like this, but if there is a pretty significant API change issue that has momentum already (or is pretty close and just needs a reroll) then we've made exceptions and resolved the functions in the older issue.
However looking at the other issue one of the remaining tasks is to still agree on an approach and is 13 years old, I'd push rather strongly to just deprecate and move them like we did here, then address that issue as follow up once everything is in classes.
Comment #21
penyaskitoOnly had some nits about service injections that we better take care of at #3497534: [meta] Clean up content_translation hooks and legacy files, so ✅ from my side.
I think with this we also make the path forward easier for more granular access controls in #2155787: Introduce more flexible access control for content translation operations.
Comment #22
nod_updated search link for #12: _content_translation_install_field_storage_definitions It seems like for D10+ modules there is only one usage. (the search engine doesn't index profiles) the matches from gitlab include modules that are not compatible with D10+
Comment #23
claudiu.cristeaJust a straight reroll
Comment #24
longwaveSorry, needs another reroll.
Comment #25
claudiu.cristeaRerolled
Comment #26
longwaveTests failing:
Comment #27
claudiu.cristeaSorry, I was in a rush and my conflict resolution was wrong
Comment #28
penyaskitoReviewed the individual commits since #21 and CI is green, back to RTBC.
Comment #30
longwaveApplied to main, committed and pushed. Doesn't cherry-pick cleanly so keeping open for backport.
Comment #32
claudiu.cristeaCreated https://git.drupalcode.org/project/drupal/-/merge_requests/15105 for 11.x
Comment #33
claudiu.cristea11.x MR is ready for review
Comment #34
penyaskitoReviewed the changes match what was committed to main.
Did you know? In gitlab UI, folders come first on commits vs files on a root folder, but the opposite for MRs. So annoying to compare.
Edit: so annoying I reported it https://gitlab.com/gitlab-org/gitlab/-/work_items/593851
Comment #36
longwaveCommitted and pushed 2606e2747e9 to 11.x. Thanks!