Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
language_test_page_top()
passing NULL substitution to TranslatableMarkup
- the cause of deprecation on PHP 8.1.
Steps to reproduce
Both fails without patch
Run core/modules/language/tests/src/Functional/LanguageUrlRewritingTest.php
on PHP 8.1
Run core/modules/comment/tests/src/Functional/CommentLanguageTest.php
on PHP 8.1
Proposed resolution
Fix test module and document that \Drupal\language\ConfigurableLanguageManager::getNegotiatedLanguageMethod()
could return NULL
Remaining tasks
User interface changes
API changes
Data model changes
Release notes snippet
Comment | File | Size | Author |
---|---|---|---|
#2 | 3240911-2.patch | 1.47 KB | andypost |
#2 | interdiff.txt | 694 bytes | andypost |
Comments
Comment #2
andypostinterdiff from https://git.drupalcode.org/project/drupal/-/commit/0cc335b64e4660b255748...
Comment #3
daffie CreditAttribution: daffie commentedLooks good to me.
I cannot find any use of the method in contrib. See: http://grep.xnddx.ru/search?text=getNegotiatedLanguageMethod%28&filename=
Therefor we can make the very small API-change.
Comment #4
alexpottIt's not an API change. It's a documentation change that reflects the reality of the current API :)
Comment #5
alexpottCommitted 0223496 and pushed to 9.3.x. Thanks!