Feature code that needs the composition API will need this as long as
we're still on Vue 2. This will also help migrate to Vue 3 more
seamlessly, as working around some breaking changes in Vue 3 requires
using the composition API.
Bug: T251974
Change-Id: I8e334ae5f447a8f9b64a7c910b2c1776cef118db
Actually, `->getBody()` returns a stream interface and in order to
get the body's content, just call `->getContent()` which will return
the response's body content in string format.
Change-Id: I9527c8a29c8da2342c8ac958c4e7bb6ba12fd613
implode is documented as taking a string[], not mixed with int or null.
Explicitly cast or remove those instead of the implicit handling by PHP.
Change-Id: I0fac52c861bf85e09571b61a899b7a041aa77914
This causes Title to no longer look up fields in the database
individually, but use LinkCache instead to load an entire row from the
page table at once.
This patch also causes Title to use in-process caching for some
getters that did not use caching before, such as isNewPage()
and getTouched(). These methods do not appear to be used on critical
code paths that involve database updates.
Note that getTouched() used to take an options $db parametr. This
appears to be unused, and has been deprecated in favor of a $flags
parameter, for consistency with other getters on the class.
DEPLOY: Risky! This re-implements the internal caching logic of Title
and slightly modifies caching semantics in some cases. This may have
unforeseen consequences.
Bug: T285389
Depends-On: I103b9e1d2bf594bfc1b0ea12b980dd20bb911c3a
Change-Id: I2df81df7186025e001520f24fd498623c7184772
filedeleteerror-short was repeated as an h2, but the parameters aren't
appropriate for prepareMessage() and filedeleteerror-short-old doesn't
exist. The message is used correctly in the following line.
Change-Id: I07481bd7d43e0596af3de183aa7814572805c8c2
The code that was previously in LinkCache::getGoodLinkRow
may return a cached row object (either from the in-process
cache, or memcached). In some cases, this caused
LinkCache::addGoodLinkObjFromRow to throw, because a field
was missing (although the field is missing only from
the cached copy, not from the database).
To avoid this, try to invalidate the cache
in LinkCache::getGoodLinkRow and retry, before
letting the exception propagate.
Bug: T205349
Change-Id: Ie9e90bf32964047c1831f575cc260d7d62e9e848
This marks whether links are being rendered for comments or elsewhere.
This information can be used in hooks; specifically, Wikibase wants to
add labels to entity links only in comments and on special pages.
Bug: T292203
Change-Id: I9164f760e8b46e05218fb36f430bc36ef1fdf30f
Change documentation to null or false where the type is allowed
Also use int on Linker::tocLine, because an int is passed most
Change-Id: I9591ac91586aa9a28f38f80e0ab576b66b303d8d
I set up a local test instance with RedisLockManager, but some things
seemed more complicated than they needed to be. So:
* Add lockManager option to $wgLocalFileRepo, which becomes the
lockManager of the auto-generated file backend.
* Made srvsByBucket be optional. I made the same change to the identical
code in MemcLockManager and DBLockManager, but I didn't test them.
* Improved doc comments for RedisLockManager::__construct() and
$wgLocalFileRepo.
Change-Id: I8ce430b8e849589d4ea87c90a56ee3659da085a0
This is just a migration hack that we forgot to remove after
PopulateImageSha1 was added as an update stage. It's complicated to
continue supporting it.
Bug: T283045
Change-Id: I453b3d8ba142a3bd17535c15d3bcf4edce641b39
This will allow code that mounts components to be written in a way that
will keep working across the Vue 2->3 migration:
var RootComponent = require( './RootComponent.vue' ),
store = require( './store.js' ); // if using Vuex
Vue.createMwApp( RootComponent )
.use( store ) // if using Vuex
.mount( '#foo' );
While we're still using Vue 2, createMwApp() will return something that
pretends to be an app object, with support for .use() and .mount().
Once we move to Vue 3, createMwApp() will remain, as a wrapper around
Vue.createApp() that adds in the i18n plugin and the error logger.
Migrating to this API won't be required immediately, since the change
upgrading Vue from v2 to v3-compat will include a compatibility wrapper
for the old calling style.
Bug: T251974
Change-Id: Ib3ef9b88547b43c566abb007cde08a27baf2b7a4
isset returns false for null and the null values are not compared,
that treats them as non-default, even the default is also null.
Bug: T291748
Follow-Up: I6e61c11d8aed27b4b559e74849e0056e5eef3638
Change-Id: I0a0932b403098967c261eee3dc0e7d5da3c4fffb