- πΊπΈUnited States xjm
Unpostponing now that the first issue is in.
- π¨πSwitzerland stefanos.petrakis@gmail.com Biel, Switzerland
Updated the description according to my understanding of how things could play out in a sequential way
This is a follow-up from
#3126127-21: Fix LanguageNegotiationMethodInterface::getLangcode() result docblock β
; the documentation for the LanguageNegotiationMethodInterface::getLangcode()
is in disagreement with the current implementations. The documentation is currently:
/**
* Performs language negotiation.
*
* @param \Symfony\Component\HttpFoundation\Request $request
* (optional) The current request. Defaults to NULL if it has not been
* initialized yet.
*
* @return string
* A valid language code or FALSE if the negotiation was unsuccessful.
*/
public function getLangcode(Request $request = NULL);
The return value is restricted to string
and the comment expands this definition to include FALSE
. However, the various plugin classes that implement this interface (usually via extends LanguageNegotiationMethodBase
), do not exclusively return strings or FALSE values, they at times return NULL values.
As suggested in
#3126127-21: Fix LanguageNegotiationMethodInterface::getLangcode() result docblock β
, the documentation should in a first step be updated to be consistent with implementations (in that issue) and then in a second step the implementations should be revised and the result of calling getLangcode()
(in this issue) be normalized.
string|false
or string|null
LanguageNegotiationMethodInterface::getLangcode()
to reflect consistently the updated definitionActive
10.1 β¨
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.
Unpostponing now that the first issue is in.
Updated the description according to my understanding of how things could play out in a sequential way