Commit graph

9 commits

Author SHA1 Message Date
C. Scott Ananian
5c18d18f46 SerializationTestUtils: handle 1.xx_wmf* versions; don't fail immediately
The validate* maintenance scripts for CacheTime, ParserOutput, and
MessageValue didn't handle 1.xx_wmf* versions correctly, sorting them
*after* the final released 1.xx version.  Further, failing immediately
when a mismatch is found in the validate* scripts can mislead maintainers
into thinking only a single mismatch is present.

Change-Id: I4c7bc281c7398d889652a6a1bd9c511d31ffca39
2024-06-03 12:23:46 -04:00
C. Scott Ananian
5d775fa1b3 SerializationTestTrait: make phpunit data providers static
PHPUnit 10 requires test data providers to be static.  This patch doesn't
completely do the job, as some providers currently call the non-static
method `$this->markTestSkippedIfPhp()`, but it gets us closer to PHPUnit 10
compatibility.

This also lets us simplify the validateParserCacheSerializationTestData
maintenance script and make it slightly more generic.

Change-Id: Ie3696bfaa29aca9da45f54239126222e8c847ea9
2024-05-22 11:43:26 -04:00
James D. Forrester
9bfb75ff90 Namespace ParserOutput
Most used non-namespaced class!

Bug: T353458
Change-Id: I4c2cbb0a808b3881a4d6ca489eee5d8c8ebf26cf
2023-12-14 14:57:34 -05:00
C. Scott Ananian
22f8397694 Update 'validateParserCacheSerializationTestData' maintenance script
Transitions the validateParserCacheSerializationTestData maintenance
script to the new maintenance script mechanism based on
maintenance/run.php

While we're here, also fix a minor bug that made the `--create` option
crash if this was the very first time serialization files for a
particular test case were being generated (ie, there was no prior
existing serialization on disk yet).

Change-Id: Ic0dadce750a2b390739ae657bab7f899860d1078
2023-09-07 20:37:36 +00:00
Petr Pchelko
a1aa3e0827 Hard-deprecate all public property access on CacheTime and ParserOutput.
- Added a test where ParserOutput objects with CacheTime
properties set are unserialized from previous versions.
- Generate new serialization tests for 1.38

Now all serialization in production is JSON, so changing
property visibility shouldn't affect ParserCache.

Bug: T263851
Depends-On: I283340ff559420ceee8f286ba3ef202c01206a23
Change-Id: I70d6feb1c995a0a0f763b21261141ae8ee6dc570
2021-10-13 13:27:16 -04:00
Umherirrender
2e4ee47c3d Cleanup mixed space/tab line indent
Change-Id: I833052a656b1ce419c0929f6f0514f2a33c2c4cc
2021-09-04 00:52:31 +02:00
Reedy
729f20afc8 Tests: Mark more closures as static
Bug: T274036
Change-Id: I911d3041cebe417d162934223b46ea295c6d20e3
2021-02-07 13:26:56 +01:00
Petr Pchelko
017cfcf016 Forward-compat for merging CacheTime and ParserOutput mOptions
CacheTime::mUsedOptions and ParserOutput::mAccessedOptions
do exactly the same thing and has to be merged into a single property.
This patch adds forward-compatibility and needs to be deployed
at least one train before the patch which actually merges the properties.

Change-Id: Ic9d71a443994e2545ebf2a826b9155c82961cb88
2020-11-10 07:09:41 -07:00
daniel
6eea7d7ed5 Add test infra for ParserCache serialization/deserialization
Based on Daniel's work at Ia6e70179b7ee5ce4e93888585ccc30d92da165c3
however was changed enough to move into a separate changeset.

More acceptance tests and data will be added in a followup commit.

Bug: T264397
Change-Id: I135187e83cbfa02b97c5656f0752f8bf1ceb58d0
2020-10-09 08:14:57 -06:00