objectcache: Drop SerializedValueContainer::isUnified
This method was deprecated in 1.42 and now can be dropped from MW core. In addition, some cosmetic changes in this patch: * Type-hint `isSegmented()` to return bool. Bug: T344521 Change-Id: Idace008e9a961953041bd21b499bfec3f8226142
This commit is contained in:
parent
75b00571a6
commit
cc7f3757b5
2 changed files with 5 additions and 22 deletions
|
|
@ -107,6 +107,8 @@ because of Phabricator reports.
|
|||
* UserGroupMembership::getGroupName(), deprecated in 1.38, and
|
||||
UserGroupMembership::getGroupMemberName(), deprecated in 1.40, have
|
||||
been removed.
|
||||
* SerializedValueContainer::isUnified(), deprecated in 1.42, has been
|
||||
removed.
|
||||
* Parser::getFreshParser(), deprecated in 1.39, has been removed.
|
||||
* ConfigFactory::getDefaultInstance(), deprecated since 1.27, has been
|
||||
removed.
|
||||
|
|
|
|||
|
|
@ -1,21 +1,15 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* Helper class for segmenting large cache values without relying on serializing classes
|
||||
* Helper class for segmenting large cache values without relying
|
||||
* on serializing classes.
|
||||
*
|
||||
* @since 1.34
|
||||
*/
|
||||
class SerializedValueContainer {
|
||||
private const SCHEMA = '__svc_schema__';
|
||||
// 64 bit UID
|
||||
private const SCHEMA_UNIFIED = 'DAAIDgoKAQw';
|
||||
// 64 bit UID
|
||||
private const SCHEMA_SEGMENTED = 'CAYCDAgCDw4';
|
||||
|
||||
/**
|
||||
* @deprecated since 1.42
|
||||
*/
|
||||
public const UNIFIED_DATA = '__data__';
|
||||
public const SEGMENTED_HASHES = '__hashes__';
|
||||
|
||||
/**
|
||||
|
|
@ -30,23 +24,10 @@ 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
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param mixed $value
|
||||
* @return bool
|
||||
*/
|
||||
public static function isSegmented( $value ) {
|
||||
public static function isSegmented( $value ): bool {
|
||||
return (
|
||||
$value instanceof stdClass &&
|
||||
( $value->{self::SCHEMA} ?? null ) === self::SCHEMA_SEGMENTED
|
||||
|
|
|
|||
Loading…
Reference in a new issue