objectcache: Deprecate SerializedValueContainer::isUnified()
Since the method for constructing a serialized value container via `newUnified()` has been removed in Id5179be032d45732db659d506d2781, its corresponding `isUnified()` method is now obsolete and this patch deprecates it to be removed in 1.43. Bug: T344521 Change-Id: I5a90028c2a596dfec9a1df306cc9d0ab90dfedd6
This commit is contained in:
parent
39af550504
commit
b3b491d292
3 changed files with 7 additions and 4 deletions
|
|
@ -621,6 +621,8 @@ because of Phabricator reports.
|
|||
Vuex 4 will remain accessible for the foreseeable future. Pinia should be used
|
||||
for new projects.
|
||||
* Linker::makeHeadline() has been deprecated.
|
||||
* SerializedValueContainer::isUnified() has been deprecated and now emits
|
||||
deprecation warnings since 1.42.
|
||||
* Linker::generateTOC(), Linker::tocIndent(), Linker::tocUnindent(),
|
||||
Linker::tocLine(), Linker::tocLineEnd(), Linker::tocList() are deprecated.
|
||||
* Title::getBrokenLinksFrom() has been deprecated.
|
||||
|
|
|
|||
|
|
@ -801,10 +801,6 @@ abstract class MediumSpecificBagOStuff extends BagOStuff {
|
|||
* @return string|null|bool The combined string, false if missing, null on error
|
||||
*/
|
||||
final protected function resolveSegments( $key, $mainValue ) {
|
||||
if ( SerializedValueContainer::isUnified( $mainValue ) ) {
|
||||
return $this->unserialize( $mainValue->{SerializedValueContainer::UNIFIED_DATA} );
|
||||
}
|
||||
|
||||
if ( SerializedValueContainer::isSegmented( $mainValue ) ) {
|
||||
$orderedKeys = array_map(
|
||||
function ( $segmentHash ) use ( $key ) {
|
||||
|
|
|
|||
|
|
@ -12,6 +12,9 @@ class SerializedValueContainer {
|
|||
// 64 bit UID
|
||||
private const SCHEMA_SEGMENTED = 'CAYCDAgCDw4';
|
||||
|
||||
/**
|
||||
* @deprecated since 1.42
|
||||
*/
|
||||
public const UNIFIED_DATA = '__data__';
|
||||
public const SEGMENTED_HASHES = '__hashes__';
|
||||
|
||||
|
|
@ -27,10 +30,12 @@ class SerializedValueContainer {
|
|||
}
|
||||
|
||||
/**
|
||||
* @deprecated since 1.42.
|
||||
* @param mixed $value
|
||||
* @return bool
|
||||
*/
|
||||
public static function isUnified( $value ) {
|
||||
wfDeprecated( __METHOD__, '1.42' );
|
||||
return (
|
||||
$value instanceof stdClass &&
|
||||
( $value->{self::SCHEMA} ?? null ) === self::SCHEMA_UNIFIED
|
||||
|
|
|
|||
Loading…
Reference in a new issue