Commit 2116ae6
Bind the context parse to the revision and clarify provider docs
The parse that fills categories and parserProperties ran without a
revision id, i.e. as a preview-like parse: revision-context magic words
({{REVISIONID}}, {{REVISIONUSER}}, ...) and parser hooks that read the
revision while recording page properties resolved against nothing, so
the recorded values could diverge from what core stored for the same
revision. That mattered little while the parse only fed categories, but
the parse products are now published to providers as the recommended
derivation path. The fix passes the revision id through
ContentParseParams. The new test pins the behavior with a
{{DEFAULTSORT:Rev{{REVISIONID}}}} page: it records Rev without the fix
and Rev<id> with it, and a second stored revision ensures resolving the
page's latest revision instead of the provided one also fails.
The content-unavailable sentinels (content and contentModel empty,
parserProperties and categories empty when the main-slot content is
hidden) had no covering test, so type-clean drift such as switching the
builder to getContentOrThrow would pass the whole suite while making
undeletion of a page with rev-deleted history fatal in production; the
new test suppresses a real revision and asserts what a provider
receives. The contentModel test only exercised wikitext, the one value
a hardcode would also produce, so a JSON page now pins that the model
comes from the actual content.
In extending.md, the sentence introducing the context now names the
content and parse products, and the section states when providers
actually run: when a revision is stored for a page carrying Subject
data (including undeletions) and during RebuildGraphDatabases runs.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>1 parent ec599b9 commit 2116ae6
3 files changed
Lines changed: 48 additions & 7 deletions
File tree
- docs/reference
- src
- tests/phpunit
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
74 | 74 | | |
75 | 75 | | |
76 | 76 | | |
77 | | - | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
78 | 81 | | |
79 | 82 | | |
80 | 83 | | |
| |||
87 | 90 | | |
88 | 91 | | |
89 | 92 | | |
90 | | - | |
91 | | - | |
| 93 | + | |
| 94 | + | |
92 | 95 | | |
93 | | - | |
| 96 | + | |
94 | 97 | | |
95 | 98 | | |
96 | 99 | | |
97 | | - | |
| 100 | + | |
98 | 101 | | |
99 | 102 | | |
100 | 103 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
64 | | - | |
| 64 | + | |
65 | 65 | | |
66 | 66 | | |
67 | 67 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
| |||
39 | 40 | | |
40 | 41 | | |
41 | 42 | | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
42 | 76 | | |
43 | | - | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
44 | 81 | | |
| 82 | + | |
45 | 83 | | |
46 | 84 | | |
47 | 85 | | |
| |||
0 commit comments