[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Page MenuHomePhabricator

[M] Handle deprecation of Serializable interface in WikibaseMediaInfo
Closed, ResolvedPublic

Description

The Serializable interface is being deprecated in php8.1. Update WikibaseMediaInfo classes that implement it (or extend from classes that implement it) to use __serialize() and __unserialize() instead (or in addition if necessary)

Event Timeline

Reedy moved this task from Backlog to Wikimedia production on the PHP 8.1 support board.
Reedy removed subscribers: taavi, aaron, Reedy.

https://php.watch/versions/8.1/serializable-deprecated

You'll need both for now, but when T271736: Migrate WMF production from PHP 7.2 to PHP 7.4/T261872: Drop PHP 7.2 & 7.3 support from MediaWiki master branch, once Wikimedia production is on 7.4 happen, cleanup can happen

On applications with PHP 7.4 as the minimum version, it is safe to drop the Serializable interface implementation and implement the new serialize and unserialize methods.

On applications that must support PHP versions older than PHP 7.4, implement both Serializable interface (that will be used on PHP <=7.3) and serialize/unserialize methods (for PHP 7.4, 8.0, and later)

CBogen renamed this task from Handle deprecation of Serializable interface in WikibaseMediaInfo to [M] Handle deprecation of Serializable interface in WikibaseMediaInfo.Feb 23 2022, 5:41 PM

These changes affect the current repo because of the following classes relationship:

MediaInfoId -> SerializableEntityId -> EntityId -> Serializable

Due to the above comment I have left the fallback implementation for later removal.

@CBogen Do we need to add a "follow-up" ticket for cleanup that need to happen after the PHP migration is completed?

Change 769402 had a related patch set uploaded (by Simone Cuomo; author: Simone Cuomo):

[mediawiki/extensions/WikibaseMediaInfo@master] Handle deprecation of Serializable interface in WikibaseMediaInfo

https://gerrit.wikimedia.org/r/769402

SimoneThisDot changed the task status from Open to In Progress.Mar 10 2022, 10:17 AM

Change 769402 merged by jenkins-bot:

[mediawiki/extensions/WikibaseMediaInfo@master] Handle deprecation of Serializable interface in WikibaseMediaInfo

https://gerrit.wikimedia.org/r/769402