Removed use of Psr\SimpleCache\CacheInterface in favor of BagOStuff, as
the latter is a tried-and-true abstraction and the former offers no real
upfront benefits since the caching patterns of SettingsBuilder are quite
basic at this time.
The simplicity of cache interface use is largely in part to the minimal
probabilistic stampede protection implementation within CachedSource
which is left untouched by this change.
Bug: T294748
Change-Id: Ie59b37a8d5c7bf96225757fa9eb9d2c762476713
This is an intermediate step before converting the merge strategies or
other configs/config schemas to YAML.
Bug: T297320
Change-Id: I91cd04d14f0ff86125fc8870984dab045c2098b5
Each table at least needs an added, deleted and unmodified link in order
to fully exercise the incremental update code.
Disable INSERT IGNORE during testing, since this can hide an omitted
delete query.
Change-Id: Iaa9f32ea5171da4f983379d7ff313bfdf1cb0b2f
Generalize makeWhere2d() to provide factorConds(), which simplifies any
boolean expression consisting of equality conditions in a
sum-of-products form.
Change-Id: Ic2d6b054b69fd0be0577807bcc4afb919af7d693
* Upgrade Vue to @vue/compat version 3.2.23
* Migrate Vue.createMwApp to Vue 3 API
* Add backwards-compatible wrapper emulating Vue 2 behavior for
new Vue( { el: '#foo', ... } ) and
new Vue( ... ).$mount( '#foo' )
* Make @vue/composition-api an alias for vue, for b/c
* Convert resources/src/vue/ to ES6
* Ignore resource/src/vue/ for jsduck, since it doesn't support ES6
* VueComponentParser: Remove check for only one root node
Bug: T251974
Co-Authored-By: Lucas Werkmeister <lucas.werkmeister@wikimedia.de>
Depends-On: Ica0c0d0d6247383796d39199e50a9aff917f5b53
Change-Id: Ibd618765f962f57984994604c61b1aff9e6a778d
This is a minimal baseline implementation that allows skins and
extensions to be loaded from settings files.
This should be improved by closely integrating SettingsBuilder with
ExtensionRegistry. They should probably end up being the same thing
eventually. Loading extension.json is essentially the same as loading
settings files.
Change-Id: I02a1d9b517815463f150b53c0602927609ff9eeb
Code of some language's parent language can't simply strip out the subcode.
e.g. ike-cans should get iu.
Change-Id: I4cf5bb1ddc463a8d98064451dd8e4dbebeca96e9
LanguageIntegrationTest asserts strict equality for namespaces, but
other extensions which add to namespaces are not accounted for. This
seems to work OK when LanguageIntegrationTest is run alongside all other
PHPUnit tests but causes failures when run on its own (see console
output in T297078).
Asserting the submap should be sufficient for this test, AIUI.
Bug: T297079
Change-Id: I708c79f452a3eede1bae1422f27160a32db0e4dd
There are common use cases to having a group inherit permissions from
another group. For example, if you have to have a "confirmed" group that
can be manually handed out to grant "autoconfirmed" status, or if you
wanted to make the "sysop" group also have "interface-admin" powers.
Previously to make this work you needed to either copy all the
$wgGroupPermission entries for the second group, or use a
$wgExtensionFunctions to copy it over at runtime. Neither are great
solutions, hence this patch.
This introduces a new configuration option, $wgGroupInheritsPermissions,
that GroupPermissionsLookup will use when determining what permissions
each group has. This option is not recursive for simplicity.
To make this work, Special:ListGroupRights now consults
GroupPermissionsLookup instead of looking at the
$wgGroupPermissions/$wgRevokePermissions globals. It also uses
UserGroupManager to get the list of all groups instead of looking at
more globals.
Anything still directly reading permissions from those globals is liable
to be broken, if they weren't already.
Bug: T275334
Change-Id: Iad72e126d2708012e1e403bee066b3017c16226d
The i18n part of T20361 / ec0dd5b adds new log parameter,
logs from before the changes are needed to work with the formatter.
Bug: T289806
Change-Id: I096bc14373cbe038671fc33f651af7e005998a3b
This reverts commit f2de49b694.
Reason for revert: breaks CI for several other extensions.
Bug: T297020
Change-Id: I20061df89f4727431be84e52e5133fe50412d338
Move cache TTL from `CachedSource` into the `CacheableSource` interface,
allowing each source to define a TTL most appropriate to its own
settings loading implementation.
Fix bug where `generation` time was computed incorrectly by `CachedSource`.
Include tests to exercise all `CachedSource` interactions with
`CacheInterface` and `CacheableSource`.
Bug: T296771
Change-Id: I97c42cf6ca716516c32104de25245aa21ec110e4
When we're done applying settings and we call `finalize()`, any further
attempt to apply settings too late should throw.
This is a defensive mechanism for us to track the state of settings applied
in during setup process and will guide us to bring all settings to be applied
in the appropriate place so unexpected things don't happen.
Bug: T296684
Change-Id: Id58654c8265bc8310e1fe464ff5a480aad8a8666
The concept of a redirect chain didn't really work for a value of
max redirect > 1. In the ideal world, we just want to have a source
which points to target (source -> target) discarding the concept of
a redirect chain completely.
Having something like: source -> target -> target1 -> target2 doesn't
really work well with the current database design.
NOTE: Support for $wgMaxRedirect will be removed soon hence
deprecation without interfaces for replacement.
Bug: T290639
Change-Id: I469de6f85e405e8ddbe7abaa5b99b77cb9cf415d
This is the same functionality provided by `npm test:size` in Minerva
and Vector skins, but as a structure test. Any extension/skin that
provides bundlesize.config.json containing an array of expected gzipped
sizes and module names will be processed by this test.
See also WikimediaMaintenance's blameStartupRegistry.php for similar
code.
Bug: T255149
Change-Id: Ieb7591f3c0ac843677a2a61b4ad47f920fc2ca2d
Avoid triggering a parse in DerivedPageDataUpdater::getPreparedEdit().
Defer the internal getOutput() call till when something actually tries
to access the timestamp property.
Bug: T277788
Change-Id: I899d9966214b36ebcd660aaf7c2da399e35be92e
$this->set was calling the overridden method, so if it was
called from setDefault, we'd end up double-prefixing the config.
Change-Id: I5f912332cc69cb58bb71e87cd9f8154246b53232
Not yet sure if config validation makes sense in production,
possibly before we write into cache we can validate, and then
trust that the cached values are all valid. This patch just
adds ability to validate the configuration.
"justinrainbow/json-schema" is already a transitive dependency
and is already in vendor.
Change-Id: Ib039c897a36a7e1911309fd29514657042b1b139