| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
| |
* Plumb this value into Parsoid's SiteConfig so that the Parsoid
library code can access this.
Bug: T373253
Bug: T385129
Change-Id: If119ff94e65325fc446ca068e0b2d2434c070a2e
|
|
|
|
|
|
|
|
|
|
| |
Use the legacy parser's ::makeLimitReport() in ParsoidParser to ensure
that a number of template-related statistics are included. Protect
ParsoidParser with a check of $wgEnableParserLimitReporting like the
legacy parser does as well.
Bug: T380758
Change-Id: Ibd812676b55eee619f7dbacc476ba84d1b65d005
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
PageBundle defines "parsoid" as,
@var null|array{counter?:int,offsetType?:string,ids:array<string,array>}
Fixes an rt testing crasher, following up
I186bf82ea1fa391a34e0ecdd9152289a18d97e14
Previously, the pb2pb transformation was fixing up the missing ids.
I0f3bae4d52c6940ef8ef3d5efdf7a97c358f0e45 is related.
Also, mw will be null until version 999.
Change-Id: Idb2faf6f990f07de99074892a968e6bb921189f3
|
|
|
|
|
|
|
|
|
|
|
| |
Implicitly marking parameter $... as nullable is deprecated in php8.4,
the explicit nullable type must be used instead
Created with autofix from Ide15839e98a6229c22584d1c1c88c690982e1d7a
Break one long line in SpecialPage.php
Bug: T376276
Change-Id: I807257b2ba1ab2744ab74d9572c9c3d3ac2a968e
|
|
|
|
|
| |
Bug: T353458
Change-Id: If02cc9b1ff78e26c1cf8c91ee4695845eb133829
|
|
|
|
|
| |
Bug: T353458
Change-Id: If0137003ab625017d322d57870448a02569668c3
|
|
|
|
|
| |
Bug: T353458
Change-Id: I3b736346550953e3b2977c14dc3eb10edc07cf97
|
|\ |
|
| |
| |
| |
| |
| |
| | |
Bug: T354908
Bug: T369719
Change-Id: I9ad5cbb9e26138fda1965f3fa4a677c15cb41d07
|
| |
| |
| |
| |
| | |
Bug: T353458
Change-Id: Id3202c0c4f4a2043bf97b7caee081acab684155c
|
|/
|
|
|
|
|
|
|
|
| |
I believe the more recent syntax is quite a bit more readable. The
most obvious benefit is that it allows for much less duplication.
Note this patch is intentionally only touching tests, so it can't
have any effect on production code.
Change-Id: Ibdde9e37edf80f0d3bb3cb9056bee5f7df8010ee
|
|
|
|
|
|
|
|
|
| |
* Its not very clean to import Wikimedia\Stats in parsoid
* Mediawiki depends on parsoid
* As a workaround we can extract the 2 methods we need in SiteConfig
Bug: T354908
Change-Id: I696131cfba6ccc26ae1f705f216e221a7c3db175
|
|
|
|
|
|
|
|
|
| |
And deprecated aliases for the the no namespaced classes.
ReplicatedBagOStuff that already is deprecated isn't moved.
Bug: T353458
Change-Id: Ie01962517e5b53e59b9721e9996d4f1ea95abb51
|
|
|
|
|
|
|
| |
Changes to the use statements done automatically via script
Addition of missing use statement done manually
Change-Id: I4ff4d0c10820dc2a3b8419b4115fadf81a76f7a2
|
|
|
|
|
|
|
| |
Page bundle headers should not contain objects, as they are supposed
to represent plaintext HTTP headers.
Change-Id: I2a87a8233b9e42cbafdba63bdf513abe00d826ce
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The `supportsContentModel` method is really querying Parsoid for the
set of content models it supports, so it makes sense to put it in the
Parsoid-specific SiteConfig service.
This is part of the work to deprecate and remove ParsoidOutputAccess.
Change-Id: I81eb2df8cef93ede95361a4e03185b3d58e5b84b
|
|/
|
|
| |
Change-Id: Ia9884f991550c96e4d9bbca9bfb882144716cd24
|
|
|
|
|
|
|
|
|
|
|
|
| |
I don't think these do anything with the documentation generators
we currently use. Especially not in tests. How are tests part of a
"package" when the code is not?
Note how most of these are simply identical to the namespace. They
are most probably auto-generated by some IDEs but don't actually
mean anything.
Change-Id: I771b5f2041a8e3b077865c79cbebddbe028543d1
|
|\ |
|
| |
| |
| |
| |
| | |
Follows-Up: I10b77b800dd23f00707011f545817182d3cb58b7
Change-Id: Id1b684876b6fbcafc96e4ae35cd9712720bad1c9
|
|\| |
|
| |
| |
| |
| |
| |
| |
| | |
The method was moved / renamed.
Needed-By: I441699e7fe9827a5e06e4638ce88c685deb9b856
Change-Id: I10b77b800dd23f00707011f545817182d3cb58b7
|
|/
|
|
| |
Change-Id: I8f82724197d20f9289d80e138d80310f1eab29f2
|
|
|
|
|
|
|
|
|
|
|
| |
I keep running into this whenever I use createNoOpMock. I think it's
XDebug that's calling this method, and then PHPUnit flooding the
console with extremely long stack traces.
We pretty much never do anything custom with this method:
https://codesearch.wmcloud.org/search/?q=__debugInfo&files=%5C.php%24
Change-Id: Ib2ab86fb243555f5e4449ed72cb032cb465e415d
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is a follow-up to: I0b683461212a357c7eb09ddec59c87539e323c65
and I40a8372a76f33c5f62ea73bb1180dd7c47412c89 which explicitly for
backward compatibility reasons supports IBufferingStatsdDataFactory.
Now that we've fully switched to StatsFactory together with the
`copyToStatsdAt()` method, we're fine to fully remove this `instanceof`
logic.
Bug: T356815
Change-Id: I164d82904b6d3fb575cb973c14f9454569bf09ac
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
HtmlOutputRendererHelper should not crash hard if the ParserOutput has
no language set. ParserOutput may come from a variety of places, we
should be lenient about it not having a language.
However, we should try harder to actually set a language on ParserOutput
if we have one available. So this also updates
PageBundleParserOutputConverter to keep the ParserOutput's language in
sync wit the language header in the PageBundle.
Bug: T349868
Bug: T353689
Bug: T359426
Change-Id: I2edf20dc3b199e22cda2f32bc858c21ca7d8f4bd
|
|\ \ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Covered:
- `testCreate`: Test the create method to create a new Parsoid parser.
Change-Id: I8aba66397e3beae5ddb765398a4ff83a606f4076
|
| |/
|/|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Covered:
- Constructor initialization with correct dependencies.
- Retrieve roles assigned to page content.
- Check if the specified role exists in the page content slots.
- Retrieve model name for specified role in page content
- Handle exception for non-existent role when retrieving model
- Retrieve content format for specified role in page content
- Retrieve serialized content for specified role in page content
- Handle exception for non-existent role when retrieving content
Change-Id: Ia2129e37b15bb8c09c0b26e487a9e311e66b932f
|
| |
| |
| |
| |
| | |
Depends-On: I5349d3378b5acd04f0d7c60072a9b1e3dd8f2052
Change-Id: I3b7fd4c460418e72ed0c36febef75f41bad0afb1
|
|\ \
| | |
| | |
| | | |
::setRawText()"
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
ParserOutput::getText() is not a simple getter, but does
transformations on the "text" of the ParserOutput; the simple getter
is named ::getRawText().
To maintain consistency, rename ParserOutput::setText() to
::setRawText() and the property name ParserOutput::$mText to
::$mRawText so future readers are not confused.
The JSON property name as it appears in the serialized ParserCache
is left as 'Text' so that we don't have any forward- or backward-
rollback issues.
Change-Id: I3ef34814ab9473cc70d0a6806e8c5a4a02b73491
|
| |/
|/|
| |
| |
| | |
Bug: T145590
Change-Id: Ic35c964e1ae224ca6985ddc01ad9eda5671fb7b6
|
| |
| |
| |
| | |
Change-Id: I5629f91387f2ac453ee4341bfe4bba310bd52f03
|
| |
| |
| |
| |
| | |
Bug: T357823
Change-Id: I1d07ff559f4607ba98bc834a1432e014f3ebdd35
|
| |
| |
| |
| | |
Change-Id: I849268172751d50292e93aa75abe8094873f56bc
|
|/
|
|
|
|
|
|
| |
Bug: T166010
Co-Authored-By: Daimona Eaytoy <daimona.wiki@gmail.com>
Co-Authored-By: James Forrester <jforrester@wikimedia.org>
Co-Authored-By: Subramanya Sastry <ssastry@wikimedia.org>
Change-Id: I79b4e732c45095eedbaa80afa5eb7479b387ed8a
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This was banned because it could be used to load other files,
including potentially local files, in IE9 and earlier. This
browser is no longer relevant. Wikimedia sites stopped supporting
the needed TLS versions for that browser 4 years ago.
Modern browsers have redefined filter to mean something different.
Generally the new filter is perfectly safe as long as we ban the url()
function which we do.
For context on why it was originally banned, see
https://static-codereview.wikimedia.org/MediaWiki/66990.html
Bug: T308160
Change-Id: Ic94f499dfe66e3cce12496893d0ecbee006bd243
|
|
|
|
|
|
|
|
|
| |
This class belongs with the rest of the Parsoid output stash code.
This class has been marked @unstable since 1.39 and thus the move
does not need release notes.
Change-Id: I16061c0c28b1549fbe90ea082cc717fee4a09a6e
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Set the render ID for each parse stored into cache so that we are able
to identify a specific parse when there are dependencies (for example
in an edit based on that parse). This is recorded as a property added
to the ParserOutput, not the parent CacheTime interface. Even though
the render ID is /related/ to the CacheTime interface, CacheTime is
also used directly as a parser cache key, and the UUID should not be
part of the lookup key.
In general we are trying to move the location where these cache
properties are set as early as possible, so we check at each location
to ensure we don't overwrite a previously-set value. Eventually we
can convert most of these checks into assertions that the cache
properties have already been set (T350538). The primary location for
setting cache properties is the ContentRenderer.
Moved setting the revision timestamp into ContentRenderer as well, as
it was set along the same code paths. An extra parameter was added to
ContentRenderer::getParserOutput() to support this.
Added merge code to ParserOutput::mergeInternalMetaDataFrom() which
should ensure that cache time, revision, timestamp, and render id are
all set properly when multiple slots are combined together in MCR.
In order to ensure the render ID is set on all codepaths we needed to
plumb the GlobalIdGenerator service into ContentRenderer, ParserCache,
ParserCacheFactory, and RevisionOutputCache. Eventually (T350538) it
should only be necessary in the ContentRenderer.
Bug: T350538
Bug: T349868
Followup-To: Ic9b7cc0fcf365e772b7d080d76a065e3fd585f80
Change-Id: I72c5e6f86b7f081ab5ce7a56f5365d2f75067a78
|
|
|
|
|
|
| |
Assist from 8c9cb701e56226cac43fee2fa24b0d0e586f1733
Change-Id: I47897c499028d9e24c00ad0bc6ba7fd8002d9bc1
|
|
|
|
|
| |
Bug: T328220
Change-Id: Iba90f7f9b5766bccc05380d040138d74d5e9558a
|
|
|
|
|
|
|
| |
Most used non-namespaced class!
Bug: T353458
Change-Id: I4c2cbb0a808b3881a4d6ca489eee5d8c8ebf26cf
|
|
|
|
|
|
|
| |
Changes to the use statements done automatically via script
Addition of missing use statements and changes to docs done manually
Change-Id: Ib326ae1e5c8409a98398c721e8b8ce42c73bd012
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Pages that are fast to render can be omitted from the parser cache
to preserve disk space and cache write operations.
The threshold is configurable per namespace, so the tradeoff can
be evaluated based on different access patterns. For example, pages
that are accessed rarely, like file description pages on commons,
may have a high threshold configured, while pages that are read
frequently, like wikipedia articles, may be configured to be always
cached, using a 0 threshold.
Filtering is based on a time profile recorded in the ParserOutput.
A generic mechanism for capturing the timing profile is implemented
in the ContentHandler base class. Subclasses may implement a more
rigorous capture mechanism.
Bug: T346765
Change-Id: I38a6f3ef064f98f3ad6a7c60856b0248a94fe9ac
|
|/
|
|
|
|
|
|
|
|
|
|
|
| |
There are a couple of user options related classes already,
and the T321527 work on dynamic defaults is going to add
even more. Let's move them into a separate namespace
to make core a bit more organized.
Old name is kept as an alias for compatibility purposes.
Bug: T321527
Bug: T352284
Change-Id: I9822eb1553870b876d0b8a927e4e86c27d83bd52
|
|
|
|
|
|
|
| |
This is much more trivial than e.g. MagicWordArray. Still deserves
it's own test, in my opinion.
Change-Id: I1c19c9c1e51fd210a3827a2200153686f7205eee
|