| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
Bug: T367441
Change-Id: I16db275bf60b80954b7e271fbeb3a86a9b8bf11e
|
|
|
|
|
| |
Bug: T367441
Change-Id: I1c6d7289c7542976393521c8d57f43a4711cc3d6
|
|
|
|
|
|
|
|
| |
Use modern php syntax to call a callable.
Reduce the stack trace to improve performance
and better IDE and static analyzer support
Change-Id: I9ef131032a662a3b8db69aa7079dbd51f88f575a
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This moves the following update logic out of
DerivedPageDataUpdater::doUpdates into listeners for the PageUpdated event:
- ResourceLoader: WikiModule::invalidateModuleCache to
ResourceLoaderEventIngress.
- TalkPageNotifications: TalkPageNotificationManager::setUserHasNewMessages
to UserNotificationEventIngress.
Bug: T378936
Change-Id: I5f2083b09d90cbd20abe2e8143a000dfc4d02aae
|
|/
|
|
|
| |
Bug: T367441
Change-Id: I926a490e81875b48753c71265e03f4d9f94e7a10
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Add $string === false or $string === null where $string can have other
types than a string.
Also document null as possible return value in FileRepo.
Change-Id: Iaa29ba01c3fd6bea506debdc6f929edfe881c808
|
| |
| |
| |
| | |
Change-Id: I0f8a8cac36015bba52aea3ee2affd92f83d3574a
|
|\ \
| |/
|/| |
|
| |
| |
| |
| |
| | |
Bug: T36738
Change-Id: I4c95950c244961f4100413eed0ebb4fa38438301
|
|/
|
|
|
|
|
|
|
|
| |
A regression in 69ad795df7719a7854672140afa3a07269639978 caused virtual
files with a versionFilePath to be silently dropped from the version
hash computation. This caused changes in these files to not be reflected
in the version hash of the file.
Bug: T385055
Change-Id: Ibde41f07bb6fa7610660cb5b7a3f7aafbe9d6bd3
|
|
|
|
|
|
|
|
|
|
| |
Change in_array with list to isset() with hashtable,
a hashtable has better performance to check the existence of entries.
Make the array pass-by-ref to avoid that a copy of the array is created
on each recursion call (Technically the copy is done on the first write
to that array, but most recursion calls writes to the array)
Change-Id: I6ef3d4c10a6ce8d70c746d6e4e67c84be170f88b
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| | |
Issues spotted while working on I03a9a6945ab27e9888ea21b03985ed713f0a9b50.
Some code style improvements too.
Change-Id: I409d0a1805aa7430cc86e53633f4f85ef8a76dcf
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Same as Ia294bf4 did for 1-line comments. This patch removes slightly
more complex 2-line PHPDoc comments that don't add any new information
to the code, but literally repeat what the code already says.
They say "don't document the code, code the documentation", and we
are doing this more and more. We just tend to forget to remove the
obsolete comments.
Note I'm also removing a line of text in a few cases when it's very
short and literally says the same as the method name. Again, such
comments add zero new information.
Change-Id: I01535404bab458c6c47e48e5456403b7a64198ed
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
I assume these are all either auto-generated by an IDE or the
language-level type declarations have been added later. In any case
the comments don't add any new information to what the code already
says. This is just extra clutter that makes the code harder to read,
I would argue.
There are many, many more comments like this. In this patch I
intentionally focus on the most trivial 1-line comments.
Change-Id: Ia294bf4ce0d8a77036842fe25884bc175c2b0e7d
|
|
|
|
|
|
|
|
|
|
| |
Use MessageBlobStore::clearGlobalCacheEntry static method directly
Delete the script test. Cache clearing is already tested in
MessageBlobStoreTest and seems sufficient here
Bug: T379722
Change-Id: I7155089081f5bd518b06b0890a3d5d5b7d0d0314
|
|
|
|
|
| |
Bug: T36738
Change-Id: Ide9e51d46377c95904694c4791f85831f4c46d36
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When accessing slot content and meta-data, most code wants to only
access the main slot. Add convenience methods for making this less
awkward.
Originally, the intent was for all code to support arbitrary slots. This
hasn't happened, instead we spread SlotREcord::MAIN all over the code
base. It seems better to adjust the interface of RevisionRecord to
reality.
Change-Id: I8603f95c8e39d6fc3522a47f74657798e7f7c061
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* For minify cache, we removed the CACHE_DB fallback in
I086e275148 (7c2c016e46), but I forgot to do the same
for the (now, mostly unused) static method.
* For less.php cache, likewise don't bother storing these
in the database if the install has no php-apcu, although
keep a fallback to an in-process cache for now.
Bug: T186673
Change-Id: Ic93e37c974c07aa74acdaaf5f990f5270f255546
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In the usual request, we need to generate two outputs for the same
module response: first minified, and second unminified (for source
maps). We did that by calling addOneModuleResponse() twice with two
different minifiers. This ran the code generating the response twice.
Most of it was already cached internally, but some parts weren't,
causing log warnings like this (which led me to find this problem):
SQLBagOStuff.WARNING: Duplicate get():
"global:resourceloader-filter:minify-js:9:<md5>" fetched 2 times
Instead, call addOneModuleResponse() once, remember what it does,
and replay those calls on the two minifiers.
We have to remember and replay the calls, instead of doing them
immediately, because sometimes the result of the first minifier
is needed to decide whether we even construct the second minifier.
Change-Id: I2a4516ebb95973f5bb1a863f4b6eecf04edd2a92
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add more precise type hints to every method I could find that takes
message params as arguments, so that Phan will warn if bool or null
is passed, which is deprecated (T378876).
Errors found in this repository thanks to these checks
are fixed in I286a4a51e879bdf61f65c87dc078621c51045bee.
Bug: T378876
Change-Id: I3e0df790ff9db2fa630f82408a7254a359fe61ca
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Follows-up I086e275148 (7c2c016e46).
Test Plan: Add the following to LocalSettings, then load
Main Page with and without this patch.
```
$myScript = "
/*@nomin*/
function example() {
// Comment: Am I minified?
if (example.toString().match(/\/\/ Comment/)) {
console.log( 'Example was %coriginal', 'background: lightGreen', );
} else {
console.log( 'Example was %cminified', 'background: pink', );
}
}
example();
";
$wgResourceModules['example'] = [
'scripts' => [
[ 'name' => 'example.js', 'content' => $myScript ]
],
];
$wgHooks['BeforePageDisplay'][] = function ( $out ) {
$out->addModules('example');
};
```
Bug: T373990
Change-Id: Ic4b8b3053a9fe458356765a24b67688602212ad8
|
| |
| |
| |
| |
| | |
Bug: T371152
Change-Id: I789c125a37f0d3549922060894f863bab146d948
|
| |
| |
| |
| |
| | |
Bug: T343492
Change-Id: Ia581ac107cb139afb0740a36f4f22f047d0de1ad
|
| |
| |
| |
| |
| | |
Bug: T343492
Change-Id: I17b53030969956bef861ce7dd98e08839cdba98a
|
| |
| |
| |
| |
| | |
Bug: T343492
Change-Id: I89a32eea3280f5c5ca809efa3fa661b2bf998e08
|
|/
|
|
|
|
|
|
|
|
|
| |
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
|
|\ |
|
| |
| |
| |
| |
| |
| | |
Improve the code to avoid phan errors detected by this type hint.
Change-Id: I134d962e1cf95f6b135f3e8959669dc41ccec877
|
|\| |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Use
$request->getRawVal( 'key' ) ?? 'default'
instead of
$request->getRawVal( 'key', 'default' )
The ?? is more flexible, avoids a wrong type detection by phan and
avoids the evaluation of the default value if not needed.
Bug: T376245
Depends-On: I3ed6b85c0d117ed7cb3a8b79f73a3eb42977891e
Change-Id: I8b02f9297b76d04e21f8cb9194f3b85631956eca
|
|/
|
|
|
|
|
|
|
| |
A constant is not a variable. The type is hard-coded via the value
and can never change. While the extra @var probably doesn't hurt much,
it's redundant and error-prone and can't provide any additional
information.
Change-Id: Iee1f36a1905d9b9c6b26d0684b7848571f0c1733
|
|\ |
|
| |
| |
| |
| |
| | |
Bug: T353458
Change-Id: I3b736346550953e3b2977c14dc3eb10edc07cf97
|
|\ \ |
|
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| | |
We've discovered some new requirements.
Follow-up to 31f614f7322c1e050eba0a91aa339e3cc495b8a1.
The hook was not in a release yet, so we can rename it.
Bug: T371530
Change-Id: I82d8ae69c27a38c45eab5d19c063f0b9515b8ec8
|
|\ \
| |/
|/| |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Providing the function name is often optional from the php code,
but it is needed for better logging, so make it mandatory and let phan
report issues about this.
Bug: T374546
Depends-On: Iaed5489a85a5a6e685829e151436afc94310fbd0
Depends-On: Ie2a1e5052e5b61bbb5b89905de942f47d3f1413d
Change-Id: I5227f2fa65850ac8c6f620900f22d1f4e7bfd470
|
|\ \ |
|
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This allows them to be used in 'mask-image' rules in CSS (introduced
in e977eea1533c) even if the image is loaded from a different domain.
It also allows JavaScript code to e.g. draw the images on <canvas>
and read back the pixel data. This should be fine, the images don't
contain any private data.
Bug: T371530
Change-Id: Iec3bdd91ca094e2da5030ac5f16ae96be49bf78e
|
|\ \
| |/
|/| |
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This never worked because it looked for `element` instead of `elements`.
The test repeated the same mistake.
Bug: T278576
Bug: T255717
Change-Id: I9bfceb6b8bd761244af6eda0e2ae08e98238aa76
|
|/
|
|
|
|
|
|
|
| |
* Deprecate SkinModule feature 'interface-message-box"
* Include styles using dedicated module where needed for content.
Bug: T375127
Depends-On: I58d9e41f0c98adbd816240b161b5145a667436cd
Change-Id: I59ab5f222dc9d01de04077d3e2cef5b42a8ffe08
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
While not documented or tested, aliases previously not only adding
but also replaced values.
Instead, emit a warning to inform skin developers of this conflict.
Note that the `content-links => elements` alias already behaves
this way (only if not already set), which the other aliases would
now be consistent with.
Change-Id: I66ae66b37bba14b2f65710f3d32f17d4e9a5a7a3
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Function alls are either complete on one line or one arg
per line. Avoid confusing calls where the args are on their
own line as this creates visual ambiguity over how many args
are passed, and what each piece belongs to. For example, is
`true` or `false` passed as 2nd arg to applyFeaturesCompatibility?
* Replace comment about list-form behaviour with something that
provides intention and insight instead of merely repeating what
can already be seen from the code.
* Fix malformed `@param` docs that used variable as part of sentence.
* Use named data providers to ease PHPUnit debugging,
and to make code coverage reports on doc.wikimedia.org more useful.
Change-Id: I2efd6cc7ac59c80684c9411025c4226473a36d43
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Move docs for deprecated aliases from top-level mentions into
footnotes under primary docs. Still easy to search for, but no
longer advertised as important for skin devs to know about
or scan past when reading.
* Fix bug in 'legacy' logic where the key was not unset, thus
mandating a needless entry in FEATURES constant. With the bug
fixed, this internal entry is no longer needed.
* Fix bug in 'interface' logic where the key was not unset
when the value is false. This would break the "skins.vector.styles"
module otherwise, and had a similar workaround in place that
is now no longer needed.
* Remove other unneeded entries in FEATURES for keys that were
already being unset by applyFeaturesCompatibility().
* Remove deprecation warnings in favour of letting ResourceModules
give a stable interface from ResourceLoader to skin.json.
* Add missing test to confirm no-op behaviour.
Bug: T374262
Change-Id: I9f4b1d48127d0afe67bada44d8dc4472507f9506
|
|
|
|
|
|
|
|
|
| |
* Corrects the previous deprecation to restore backwards compatible functionality to i18n-all-lists-margins for skin developers without
any change on their part.
* Updates deprecation message to give clearer next steps.
Bug: T369475
Change-Id: I98696b4a52838a4836320a491430e669e3a5d1e1
|