This code started to fail when executing the FileImporter tests.
FileImporter triggers a hook that ends here.
Two suggestions:
* I think we don't need/don't want to have log entries for PHPUnit
test runs.
* In test scenarios getSkin() might return null. Since getSkinName
is also allowed to be null I believe it's fine when we log null in
such a situation.
Bug: T337270
Change-Id: I9bf946c150d99ab97b4cdf128fac87158c633331
Add a deprecation log message for the autoMsg and autoSafeMsg
functions in WikiEditor. The console output details what needs
to change, and adds a link to on-wiki search for the affected
string.
Depends-On: I2835341867df85552579ea6927cd39a6f889fa6b
Change-Id: I2aea96c8a4097f34b02301083f9db0be95042243
WikiEditor has a clever functionality where you can enter a message
key directly by using [key]Msg syntax in the object definition. While
that may have been a clever approach, it led to tons of messages
in this extension having to be marked as RawHtmlMessages because
they could potentially be parsed as HTML. Thus I am replacing all
of these instances with using mw.message explicitly instead, with
the necessary method attached.
The autoMsg (and its cloned autoSafeMsg) functions have had FIXME
comments attached since 2018 saying that these methods are
unnecessarily complex and should be replaced with using mw.messages
directly.
This solves a lot of problems for translators in Translatewiki, and
hopefully makes the code more straightforward and easier to understand
for those reading it down the line.
I would like to remove the autoMsg and autoSafeMsg functions
altogether, but their functionality is still in use in a few
extensions (and potentially on-wiki code), so we would have to
clean up that first.
Bug: T154891
Bug: T294760
Change-Id: I2835341867df85552579ea6927cd39a6f889fa6b
These config settings were specific to the Cite extension,
and are misleading on wikis that don't have that extension
installed. Move the functionality to the Cite extension
instead.
Bug: T339973
Depends-On: Ib3fdc897dd3330f69c5832003d4c3cb1e6dba2f3
Change-Id: Ib619706ddfca724990e1db2d51f12a2eb05f6a72
This reverts commit 929e8463fb.
Reason for revert: we're still seeing double-logging of some events, so this is apparently still needed until we can track down what's causing that.
Change-Id: Ifc32dfc7aa2ca67169759ecd8c278f1aea2dbef8
The EditAttemptStep instrument is a candidate for migration to the
Metrics Platform [0]. The first step of the migration is to log events
both using the Event Platform (i.e. EventLogging::submit()) and using
the Metrics Platform Client (i.e. via
EventLogging::submitMetricsEvent()).
The Metrics Platform Client can mix in additional information -
so-called context attributes [1] - based on the stream configuration.
Since the majority of the default values mixed into each event in
Hooks::doEventLogging() are already known to the Metrics Platform
Client, the majority of Hooks::doMetricsPlatformLogging() is concerned
with remove those values from the event.
[0] https://wikitech.wikimedia.org/wiki/Metrics_Platform
[1] https://gerrit.wikimedia.org/g/mediawiki/libs/metrics-platform/+/aed6738b845/js/src/StreamConfig.d.ts#31
[2] https://wikitech.wikimedia.org/wiki/Metrics_Platform/Creating_a_Stream_Configuration
Bug: T309985
Change-Id: I052159884a9a8b21b3dc9ee01e2cafdbb173ca26