Hard-deprecate manual construction of Language objects
Bug: T343771 Depends-On: Ie0f08b29f3daff33f23c7107ccf98e2c3aa78cf9 Depends-On: I2d46db4be6e967ee5e7764c6df62d2214fe08683 Depends-On: Id2423c87c17a2f357d5e1cfeef3aeb83b6ad9a0d Depends-On: I65ad7a46114d1ba812fc47bf623c0a5753acac97 Depends-On: Ib7ec113a21fd36a82c0345ffb98ed8692d82155d Depends-On: Ib390ffe80ffd62b7f22efe86f6a08108959a970c Change-Id: I0c8d136ef22e43749a171f08e19b9b9b507edba9
This commit is contained in:
parent
7e5b96ee7d
commit
93ce9ff0a5
2 changed files with 7 additions and 1 deletions
|
|
@ -398,6 +398,8 @@ because of Phabricator reports.
|
|||
* MessageCache::get() with $language other than Language or null is
|
||||
deprecated and emits deprecation warnings. For high-level access,
|
||||
use wfMessage() or RequestContext::msg() instead.
|
||||
* Manually constructing a Language object, deprecated in 1.35, now emits
|
||||
deprecation warnings. Use LanguageFactory instead.
|
||||
* SearchEngineConfig::getConfig() has been deprecated, use DI with
|
||||
ServiceOptions to inject the required options.
|
||||
* ObjectCache::isDatabaseId() and ::getLocalClusterInstance() have been
|
||||
|
|
|
|||
|
|
@ -306,7 +306,7 @@ class Language implements Bcp47Code {
|
|||
/**
|
||||
* @internal Calling this directly is deprecated. Use LanguageFactory instead.
|
||||
*
|
||||
* @param string|null $code Which code to use. Passing null is deprecated in 1.35.
|
||||
* @param string|null $code Which code to use. Passing null is deprecated in 1.35, hard-deprecated since 1.43.
|
||||
* @param NamespaceInfo|null $namespaceInfo
|
||||
* @param LocalisationCache|null $localisationCache
|
||||
* @param LanguageNameUtils|null $langNameUtils
|
||||
|
|
@ -327,6 +327,10 @@ class Language implements Bcp47Code {
|
|||
) {
|
||||
if ( !func_num_args() ) {
|
||||
// Old calling convention, deprecated
|
||||
wfDeprecatedMsg(
|
||||
__METHOD__ . ' without providing all services is deprecated',
|
||||
'1.35'
|
||||
);
|
||||
if ( static::class === 'Language' ) {
|
||||
$this->mCode = 'en';
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Reference in a new issue