This is to ensure that the CI job is working with the new version.
Note: redundant_condition_detection should have worked as expected by
this version, but unfortunately it still has false positives.
Bug: T235049
Bug: T231636
Change-Id: Idaba6584cb5b2ff19b6455c7bbec6b89619ddbff
This was a pretty obscure menu item on doc.wikimedia.org at
<https://doc.wikimedia.org/mediawiki-core/master/php/>.
Merge this into the Installer group for now, which is where it's
located source-code wise. Whether this class is even needed still
is a separate matter. The PHP version is ancient, but there are
known one-to-many relations with C-libs, so I'll leave that to be
evaluated some other time.
(The Installer group is labeled "Deployment" which is its own
quirk that we should probably revisit as well.)
Change-Id: I00684840162989205c9e0feb4794b23aa8025b8f
Currently packageFiles callbacks take 2 parameters, $context and $config.
This patch allows for specifying an extra parameter in the packageFiles
definition that will be passed to the callback. Example:
'callback' => function ( $context, $config, $extra ) { ... },
'callbackParam => [ 'this is val 1', 'this is val 2' ],
The callback will be called with the usual $context and $config
parameters, and the extra array is passed as third parameter.
Bug: T233634
Change-Id: Ie11874665f4f9a557d4e394dcab3a972887e8126
This reverts commit 5f06efb318, which
reverted 9335363789, which makes
the deprecated property AbstractBlock::mReason private.
After 9335363789, AbstractBlock::mReason is obsolete, since the block
reason is now stored as a CommentStoreComment, AbstractBlock::reason.
Change-Id: Ica0a74be90383689ca8e4cfe6d0fb25c9a5942c5
This reverts commit 9335363789.
Reason for revert: It's full of code accessing AbstractBlock::mReason
out there, see [1]. Also, it was never hard deprecated. While that may
be acceptable under some circumstances, it's definitely not OK to remove
code when there are consumers around. I'd have fixed it right now without
reverting if it were a single repo, but there's just too many.
[1] - https://codesearch.wmflabs.org/search/?q=-%3EmReason&i=nope&files=&repos=
Change-Id: I8669f502b50cff89e28dada0f65fe2b130ae9b37
AbstractBlock::setReason now accepts a string, Message or
CommentStoreComment. The CommentStoreComment is accessed via
AbstractBlock::getReasonComment.
AbstractBlock::getReason returns the reason as a string, with
the language and format consistent with how block reasons were
built before this commit. This method is deprecated, since it
makes assumptions about the language and format needed. The
deprecated mReason property is no longer public.
Doing this (and T227005) will remove the implicit dependency of
BlockManager::getUserBlock on language, which causes a recursion
error if the block is checked before the user has loaded. It also
provides a mechanism for getting the block reason in a language
specified by the caller. (This does not apply to DatabaseBlock
reasons entered via the Special:Block form, which were not and
are still not translatable.)
This commit also updates authentication classes to return the
translated reason.
Bug: T227007
Change-Id: Iec36876e930dff96a256aebbdc39cbfb331c244e
Some of the errors are suppressed because they're phan false positives.
The idea behind this is that they'll be fixed in a future version of
phan, and we'll just have to remove the suppressions.
Note: I'm disabling UnusedPluginSuppression so that we can start suppressing
issues even if they're still disabled. The sniff should be re-enabled
as soon as we upgrade phan.
Bug: T231636
Change-Id: I0f7fa06a9e03fbb86c7a5eb6e50a850bb258a7f7
This never happens in core code; however extensions have slipped into
a state of sin.
Bug: T235392
Change-Id: Ia254949cd8b3bc162b11dcc911dcce40d91bf1b7
* This ensures we run all necessary hooks that extensions expect
will be run for their content.
* We will rip out this method once we decide / discover that we don't
need it anymore.
Change-Id: I683bd6c3cc2c3f4d65326adab78cdf70ae39a51a
This change reverts most of commit 3dff713fe4.
Especially the return type hints for getTitle() and Title() are reduced
to allow the type null as return value, because SematicMediaWiki uses
this by
$this->parser->getTitle() instanceof Title
to check if there is a valid Title object.
The parameter type hints for setTitle() and Title() are kept.
Bug: T235392
Change-Id: I72ac1c9d37059876dbc7cd38158e7abd212da8fe
This removes the requirement that setUp() and tearDown() in the derived
class need to call the parent.
Change-Id: I9d4771c28160356ff58884e3a58fa28c8db4e8a5
Makes it possible to mock static Title methods in tests, where
they are one of the more common reasons for not being able to
use MediaWikiUnitTestCase.
Actually introducing dependency injection to Title is left for
the future.
Change-Id: I959ba87f8e283da9549b6bfcefd338e60b00be8f