Problem/Motivation

  • language_process_language_select
  • language_configuration_element_submit
  • language_get_default_langcode
  • language_negotiation_url_prefixes_update
  • language_get_browser_drupal_langcode_mappings

Steps to reproduce

Proposed resolution

Move language_process_language_select to Language hook class
The remaining functions are used in a few places each, need to review and decide if one service or separate locations.

Remaining tasks

User interface changes

Introduced terminology

API changes

Data model changes

Release notes snippet

Issue fork drupal-3574727

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

nicxvan created an issue. See original summary.

nicxvan’s picture

Issue summary: View changes

claudiu.cristea made their first commit to this issue’s fork.

claudiu.cristea’s picture

Status: Active » Needs review
claudiu.cristea’s picture

claudiu.cristea’s picture

This is ready for review. There's still an unanswered question from @Berdir which deserves an answer but I'm not sure I have an opinion

claudiu.cristea’s picture

Ready for review

nicxvan’s picture

I think this is almost ready, just need a confirmation from @berdir.

That test is some clever cleanup too!

berdir’s picture

Status: Needs review » Needs work

Resolved that, but added some new comments. I think we should consistently deprecate this for D13. Also might be good to get a +1 from our new language.module maintainer here.

penyaskito’s picture

A couple of (new) methods names are confusing or we might want to inline them, but IMHO we want to keep diffs here at a minimum. As a middle ground suggesting we make them private before anyone depends on them.

Otherwise no big concerns.

penyaskito’s picture

I didn't explicitly comment on it, but AFAIK deprecating for drupal:12.0.0 train has passed, so all should be drupal:13.0.0.

nicxvan’s picture

Status: Needs work » Reviewed & tested by the community

Had a discussion in slack about this with @penyaskito about the private bit and the deprecations.

The deprecation versions are consistent with current policies, the functions are all deprecated in 11.4 and removed in 13, the new constructor parameters are deprecated in 11.4 and removed in 12.

As for the private vs protected, I don't think this is the place for private since the goal is specifically to not have them marked as api.
These items are already not api, they are protected, and they are on plugins. for plugins only the name is api and protected methods are not api.

https://www.drupal.org/about/core/policies/core-change-policies/bc-polic...
https://www.drupal.org/about/core/policies/core-change-policies/bc-polic...

I applied the version deprecation suggested in 10, but since it was just a version bump I think I'm still eligible. I don't think we really need that submit handler to be a 13 removal, but I don't think it harms anything to stick around either.

To add a bit more from slack, the reason why @penyaskito wanted private was to add more leeway in refactoring before the next (13) major.
Personally I think private should strongly be restricted to just experimental features, not just for convenience here. If others feel otherwise I think we can discuss it more if necessary.

Link to slack thread: https://drupal.slack.com/archives/C079NQPQUEN/p1775613336644339 (search for this string in the slack app to find it)

Edit, I just remembered I did the initial commit, but that was just one function which had updates and other reviews so I think it's still fine to RTBC here.

penyaskito’s picture

+1 to the above. Even if we don't agree on the private policy, this is not the issue for changing that.

And the benefits of getting this in outweigh the drawbacks.

  • alexpott committed a204e12f on 11.x
    task: #3574727 Deprecate remaining language.module code
    
    By: nicxvan
    By...

  • alexpott committed a0dcfd36 on main
    task: #3574727 Deprecate remaining language.module code
    
    By: nicxvan
    By...
alexpott’s picture

Version: main » 11.x-dev
Status: Reviewed & tested by the community » Fixed

Committed a0dcfd3 and pushed to main. Thanks!
Committed a204e12 and pushed to 11.x. Thanks!

Resolved conflicts on merge to 11.x as they were simple.

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.