Clean up old ParserCache serialization test cases
Open, Needs TriagePublic

Description

We don't need to test the PHP serialization any more, and we don't need to test versions as far back as 1.35. Just "the last version" and "the next version" should be sufficient.

Event Timeline

This could also help for php8.2 as dynamic properties, even after serialization, are deprecated (T314099), at the moment the tests are skipped on php8.2 (1b9809b3). Not sure if the check for ghost fields could make problems, but the json format should not be a problem (hopefully).

As mentioned in https://gerrit.wikimedia.org/r/c/mediawiki/core/+/1000086 and by @Umherirrender above there's a bunch of "ghost field" serialization compat that can get stripped out too.

Clarified the current compatibility policy with @daniel (prompted by a discussion with @Krinkle on https://gerrit.wikimedia.org/r/c/mediawiki/core/+/1023098) and documented the policy at https://www.mediawiki.org/wiki/Manual:Parser_cache/Serialization_compatibility:

tl;dr the current policy is to retain compatibility with two LTS releases. Right now (1.43.0-wmf.2) that's back to 1.35 and PHP serialization, even though serializing as PHP was turned off in 1.39 (697f28df320d957676ad2cbaaeedba9b2e80bdfa).

So that means this task is blocked until 1.44.0 is branched; at which point we can remove PHP serialization support (including "reading PHP serialized objects" in ParserCache and the 'ghost field' support) as well as the serialization test files before 1.39 (aka *.serialized and 1.35-*, 1.36-*, and 1.38-* in tests/phpunit/data/ParserCache).

Change #1149627 had a related patch set uploaded (by Isabelle Hurbain-Palatin; author: Isabelle Hurbain-Palatin):

[mediawiki/core@master] Remove PHP (de-)serialization support from ParserOutput

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

Change #1149698 had a related patch set uploaded (by Isabelle Hurbain-Palatin; author: Isabelle Hurbain-Palatin):

[mediawiki/core@master] Deprecate GhostFieldAccessTrait.php

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

Change #1149698 merged by jenkins-bot:

[mediawiki/core@master] Deprecate GhostFieldAccessTrait.php

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

Change #1149627 merged by jenkins-bot:

[mediawiki/core@master] Remove PHP (de-)serialization support from ParserOutput

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

Change #1149777 had a related patch set uploaded (by C. Scott Ananian; author: Isabelle Hurbain-Palatin):

[mediawiki/core@REL1_44] Deprecate GhostFieldAccessTrait.php

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

Change #1149777 merged by jenkins-bot:

[mediawiki/core@REL1_44] Deprecate GhostFieldAccessTrait.php

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

Change #1160243 had a related patch set uploaded (by C. Scott Ananian; author: C. Scott Ananian):

[mediawiki/core@master] Remove test case support for PHP serialization of ParserOutput

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

Change #1160243 merged by jenkins-bot:

[mediawiki/core@master] Remove test case support for PHP serialization of ParserOutput

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

Change #1165572 had a related patch set uploaded (by C. Scott Ananian; author: C. Scott Ananian):

[mediawiki/core@master] Warn if PHP serialization of ParserOutput occurs

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

Change #1165581 had a related patch set uploaded (by C. Scott Ananian; author: C. Scott Ananian):

[mediawiki/core@master] Use JSON serialization for PageEditStash

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

Change #1165581 merged by jenkins-bot:

[mediawiki/core@master] Prepare to use JSON serialization for PageEditStash

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

Change #1165572 merged by jenkins-bot:

[mediawiki/core@master] Warn if PHP serialization of ParserOutput occurs

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