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)
|mediawiki/extensions/WikibaseMediaInfo||master||+59 -7||Handle deprecation of Serializable interface in WikibaseMediaInfo|
- Mentioned In
- T303505: [S] Remove Deprecated methods "serialize" and "unserialize" after php production upgrade to PHP 7.4
T301249: Handle deprecation of Serializable interface in Wikibase
- Mentioned Here
- T261872: Drop PHP 7.2 & 7.3 support from MediaWiki master branch, once Wikimedia production is on 7.4
T271736: Migrate WMF production from PHP 7.2 to PHP 7.4
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)
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?