Merge "Remove VectorLanguage A/B test code (WgVectorLanguageInHeaderTreatmentABTest)"
This commit is contained in:
commit
ecba35aeca
|
@ -98,17 +98,6 @@ final class Constants {
|
|||
*/
|
||||
public const REQUIREMENT_LANGUAGE_IN_HEADER = 'LanguageInHeader';
|
||||
|
||||
/**
|
||||
* Defines whether or not the Language in header A/B test is running. See
|
||||
* https://phabricator.wikimedia.org/T280825 for additional detail about the test.
|
||||
*
|
||||
* Note well that if the associated config value is falsy, then we fall back to choosing the
|
||||
* language treatment based on the `VectorLanguageInHeader` config variable.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
public const CONFIG_LANGUAGE_IN_HEADER_TREATMENT_AB_TEST = 'VectorLanguageInHeaderTreatmentABTest';
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
|
|
|
@ -53,8 +53,7 @@ return [
|
|||
$services->getCentralIdLookupFactory()->getNonLocalLookup(),
|
||||
Constants::CONFIG_KEY_LANGUAGE_IN_HEADER,
|
||||
Constants::REQUIREMENT_LANGUAGE_IN_HEADER,
|
||||
null,
|
||||
Constants::CONFIG_LANGUAGE_IN_HEADER_TREATMENT_AB_TEST
|
||||
null
|
||||
)
|
||||
);
|
||||
|
||||
|
@ -63,13 +62,9 @@ return [
|
|||
// Temporary T286932 - remove after languages A/B test is finished.
|
||||
$requirementName = 'T286932';
|
||||
|
||||
// MultiConfig checks each config in turn, allowing us to override the main config for specific keys. In this
|
||||
// case, override the "VectorLanguageInHeaderABTest" configuration value so that the following requirement
|
||||
// always buckets the user as if the language treatment A/B test were running.
|
||||
// MultiConfig checks each config in turn, allowing us to override the main config for specific keys.
|
||||
$config = new MultiConfig( [
|
||||
new HashConfig( [
|
||||
Constants::CONFIG_LANGUAGE_IN_HEADER_TREATMENT_AB_TEST => true,
|
||||
] ),
|
||||
new HashConfig( [] ),
|
||||
$services->getMainConfig(),
|
||||
] );
|
||||
|
||||
|
@ -81,8 +76,7 @@ return [
|
|||
$services->getCentralIdLookupFactory()->getNonLocalLookup(),
|
||||
Constants::CONFIG_KEY_LANGUAGE_IN_HEADER,
|
||||
$requirementName,
|
||||
/* $overrideName = */ '',
|
||||
Constants::CONFIG_LANGUAGE_IN_HEADER_TREATMENT_AB_TEST
|
||||
/* $overrideName = */ ''
|
||||
)
|
||||
);
|
||||
|
||||
|
|
|
@ -541,10 +541,6 @@
|
|||
},
|
||||
"description": "@var When `VectorLanguageAlertInSidebar` is enabled, the language switch alert box is shown in the sidebar."
|
||||
},
|
||||
"VectorLanguageInHeaderTreatmentABTest": {
|
||||
"value": false,
|
||||
"description": "@var boolean Enables or disables the language in header treatment A/B test. See https://phabricator.wikimedia.org/T280825 and associated tasks for additional detail."
|
||||
},
|
||||
"VectorStickyHeader": {
|
||||
"value": {
|
||||
"logged_in": true,
|
||||
|
|
|
@ -322,7 +322,7 @@ class OverridableConfigRequirementTest extends \MediaWikiUnitTestCase {
|
|||
) {
|
||||
$config = new HashConfig( [
|
||||
Constants::CONFIG_KEY_LANGUAGE_IN_HEADER => $configValue,
|
||||
Constants::CONFIG_LANGUAGE_IN_HEADER_TREATMENT_AB_TEST => $abValue,
|
||||
$testName => $abValue,
|
||||
] );
|
||||
|
||||
$user = $this->createMock( User::class );
|
||||
|
|
Loading…
Reference in New Issue