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
ResolvedJdforrester-WMF
ResolvedJoe
ResolvedDzahn
Resolvedhashar
ResolvedJdforrester-WMF
ResolvedLadsgroup
Resolved MoritzMuehlenhoff
Resolvedjijiki
Resolved MoritzMuehlenhoff
ResolvedTrizek-WMF
ResolvedDzahn
Resolved Gilles
ResolvedDzahn
ResolvedRequestPapaul
Resolvedjijiki
DeclinedNone
ResolvedDzahn
ResolvedDzahn
ResolvedPapaul
Resolved Cmjohnson
ResolvedRequest Cmjohnson
ResolvedRequestPapaul
ResolvedAndrew
ResolvedArielGlenn
ResolvedDzahn
ResolvedLegoktm
ResolvedPapaul
ResolvedDzahn
Declined Gilles
ResolvedVolans
ResolvedDzahn
ResolvedLegoktm
ResolvedPleaseStand
ResolvedJoe
Resolvedtstarling
ResolvedArielGlenn
ResolvedJoe
Resolvedtstarling
ResolvedJdforrester-WMF
ResolvedJdforrester-WMF
ResolvedLegoktm
ResolvedJdforrester-WMF
ResolvedDaimona
ResolvedDaimona
ResolvedJdforrester-WMF
ResolvedJoe
ResolvedJMeybohm
ResolvedJoe
ResolvedJoe
ResolvedJoe
ResolvedJoe
ResolvedKrinkle
ResolvedJoe
ResolvedClement_Goubert
ResolvedClement_Goubert
ResolvedClement_Goubert
ResolvedMainframe98
ResolvedJoe
ResolvedZabe

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 subscribed.

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.