jenkins-bot has submitted this change and it was merged.
Change subject: Rm EntityParserOutputGeneratorFactory bad opts
......................................................................
Rm EntityParserOutputGeneratorFactory bad opts
This class sets an option with the
ValueFormatter::OPT_LANG key.
This key
a) should not be used with SerializationOptions
and
b) is not used anywhere when set in this case
So it is removed, as it was stupid,
and shouldn't do anything..
Change-Id: I79085263db81c75346d23baa6a7fdc1b3a91afa6
---
M repo/includes/EntityParserOutputGeneratorFactory.php
1 file changed, 3 insertions(+), 24 deletions(-)
Approvals:
Jonas Kress (WMDE): Looks good to me, but someone else must approve
Jeroen De Dauw: Looks good to me, approved
jenkins-bot: Verified
diff --git a/repo/includes/EntityParserOutputGeneratorFactory.php
b/repo/includes/EntityParserOutputGeneratorFactory.php
index c3f4153..ce28add 100644
--- a/repo/includes/EntityParserOutputGeneratorFactory.php
+++ b/repo/includes/EntityParserOutputGeneratorFactory.php
@@ -3,7 +3,6 @@
namespace Wikibase;
use ParserOptions;
-use ValueFormatters\ValueFormatter;
use Wikibase\Lib\Serializers\SerializationOptions;
use Wikibase\Lib\Store\EntityInfoBuilderFactory;
use Wikibase\Lib\Store\EntityTitleLookup;
@@ -91,7 +90,7 @@
return new EntityParserOutputGenerator(
$this->entityViewFactory,
- $this->newParserOutputJsConfigBuilder( $languageCode ),
+ $this->newParserOutputJsConfigBuilder(),
$this->entityTitleLookup,
$this->valuesFinder,
$this->entityInfoBuilderFactory,
@@ -104,14 +103,10 @@
}
/**
- * @param string $languageCode
- *
* @return ParserOutputJsConfigBuilder
*/
- private function newParserOutputJsConfigBuilder( $languageCode ) {
- return new ParserOutputJsConfigBuilder(
- $this->makeJsConfigSerializationOptions( $languageCode )
- );
+ private function newParserOutputJsConfigBuilder() {
+ return new ParserOutputJsConfigBuilder( new
SerializationOptions() );
}
/**
@@ -125,22 +120,6 @@
return $this->languageFallbackChainFactory->newFromLanguageCode(
$languageCode
);
- }
-
- /**
- * @param string $languageCode
- *
- * @return SerializationOptions
- */
- private function makeJsConfigSerializationOptions( $languageCode ) {
- // NOTE: when serializing the full entity to be stored in the
- // wbEntity JS config variable, we currently do not want any
- // language fallback to be applied.
-
- $options = new SerializationOptions();
- $options->setOption( ValueFormatter::OPT_LANG, $languageCode );
-
- return $options;
}
}
--
To view, visit https://gerrit.wikimedia.org/r/227222
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I79085263db81c75346d23baa6a7fdc1b3a91afa6
Gerrit-PatchSet: 10
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Addshore <[email protected]>
Gerrit-Reviewer: Aude <[email protected]>
Gerrit-Reviewer: Bene <[email protected]>
Gerrit-Reviewer: Daniel Kinzler <[email protected]>
Gerrit-Reviewer: JanZerebecki <[email protected]>
Gerrit-Reviewer: Jeroen De Dauw <[email protected]>
Gerrit-Reviewer: Jonas Kress (WMDE) <[email protected]>
Gerrit-Reviewer: Thiemo Mättig (WMDE) <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits