LanguageSwitcherLinksAlterer wrong argument type

Created on 18 October 2023, over 1 year ago

Problem/Motivation

In the context of #3255596: Fix coding standards β†’ we fixed coding standards but it was a wrong decision to set string type for the $type argument in
LanguageSwitcherLinksAlterer::alter()
Yes, the annotation for functions says that this argument must be a string

  • hook_language_switch_links_alter()
  • LanguageManagerInterface::getLanguageSwitchLinks

but we still must have a way to set NULL cuz *LanguageNegotiatorInterface::getNegotiationMethods()* uses it to return all methods.
This means that it wasn't refactored in the core, so such an implementation can cause critical errors on the site.

Proposed resolution

Allow to set string and NULL values.

πŸ› Bug report
Status

Active

Version

2.0

Component

Code

Created by

πŸ‡ΊπŸ‡¦Ukraine HitchShock Ukraine

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024