Follow-up to #2403229: language.negotiation configuration can have overrides bleed in
Problem/Motivation
We should move language_negotiation_url_prefixes_update() logic to a static method in ConfigurableLanguage so it can be reused and remove language_negotiation_url_prefixes_update().
Proposed resolution
Move logic to a static method in ConfigurableLanguage.
Remove language_negotiation_url_prefixes_update()
Remaining tasks
Create a patch
User interface changes
None.
API changes
The following global function is removed:
language_negotiation_url_prefixes_update()
Use ConfigurableLanguage::updateAllUrlPrefixes() instead.
Comments
Comment #2
penyaskitoComment #3
andypostvisibility is not set, if this static then public and makes sense to pass config factory as argument
otoh maybe language negotiation system should add a method
Comment #4
penyaskito@andypost Thanks for reviewing! I forgot visibility, must be public.
When you say adding a method to language negotiation, do you mean LanguageManagerInterface?
Comment #5
andypostno,
\Drupal\language\LanguageNegotiatorotoh\Drupal\language\LanguageNegotiationMethodManager- not sureComment #6
penyaskitoI don't think it makes sense in
\Drupal\language\LanguageNegotiator.\Drupal\language\LanguageNegotiationMethodManagerlooks a better idea, but not ideal neither :-/I think the best fit is still the
ConfigurableLanguageclass.Comment #17
quietone commentedFrom reading the issue summary, this is a task not a bug.