Page MenuHomePhabricator

[S] Remove Deprecated methods "serialize" and "unserialize" after php production upgrade to PHP 7.4
Closed, InvalidPublic

Description

Since PHP 7.4 classes that implement the "serializable interface" have had some changes in the way they are implemented.

The code has been updated in the repository on this task T301223: [M] Handle deprecation of Serializable interface in WikibaseMediaInfo, but the fallback methods have been left in place as they require the migration of the live PHP servers before they can be changed.

This ticket is a cleanup ticket required to remove the redundant code after the following two tickets have been completed:

Related Objects

StatusSubtypeAssignedTask
InvalidNone
StalledNone
OpenNone
ResolvedDzahn
Resolvedhashar
ResolvedJdforrester-WMF
ResolvedLadsgroup
ResolvedMoritzMuehlenhoff
Resolvedjijiki
ResolvedMoritzMuehlenhoff
ResolvedTrizek-WMF
ResolvedDzahn
Resolved Gilles
ResolvedDzahn
ResolvedRequestPapaul
Resolvedjijiki
DeclinedNone
ResolvedDzahn
ResolvedDzahn
ResolvedPapaul
ResolvedCmjohnson
ResolvedRequestCmjohnson
ResolvedRequestPapaul
ResolvedAndrew
ResolvedArielGlenn
ResolvedDzahn
ResolvedLegoktm
ResolvedPapaul
ResolvedDzahn
Declined Gilles
ResolvedVolans
ResolvedDzahn
ResolvedLegoktm
ResolvedPleaseStand
OpenNone
ResolvedJoe
Resolvedtstarling
ResolvedArielGlenn
ResolvedJoe
Resolvedtstarling
OpenJdforrester-WMF
OpenJdforrester-WMF
ResolvedLegoktm
OpenLegoktm
OpenJdforrester-WMF
ResolvedDaimona
ResolvedDaimona
ResolvedJoe
ResolvedJMeybohm
OpenNone
OpenJoe
OpenNone
OpenNone

Event Timeline

CBogen renamed this task from Remove Deprecated methods "serialize" and "unserialize" after php production upgrade to PHP 7.4 to [S] Remove Deprecated methods "serialize" and "unserialize" after php production upgrade to PHP 7.4.Mar 23 2022, 4:33 PM
matthiasmullie added a subscriber: matthiasmullie.

These methods should not be removed or things will break.

The use of the Serializable interface is not deprecated; it's only deprecated when not *also* implementing the new magic methods (i.e. having both is fine)
Both are currently required because both implementations serialize data into a different format, and both are needed to be able to unserialize data for as long as we might have some stored in the old format.
PHP figures out which to use based on the format of the serialized data.

The Serializable interface will not be removed or further deprecated before the next major PHP version (PHP 9), which will take at least another few years.