WikidataBuilder has uploaded a new change for review.
https://gerrit.wikimedia.org/r/318268
Change subject: New Wikidata Build - 2016-10-27T10:00:01+0000
......................................................................
New Wikidata Build - 2016-10-27T10:00:01+0000
Change-Id: I3e6a0a2a155a241efd8599bcca182e266ca9b720
---
M composer.lock
M extensions/ArticlePlaceholder/includes/AboutTopicRenderer.php
M extensions/ArticlePlaceholder/includes/ItemNotabilityFilter.php
M
extensions/ArticlePlaceholder/includes/Lua/Scribunto_LuaArticlePlaceholderLibrary.php
M extensions/ArticlePlaceholder/includes/specials/SpecialCreateTopicPage.php
A extensions/Wikibase/client/i18n/nso.json
M
extensions/Wikibase/client/tests/phpunit/includes/DataAccess/DataAccessSnakFormatterOutputFormatTest.php
A extensions/Wikibase/lib/includes/Formatters/CommonsThumbnailFormatter.php
M extensions/Wikibase/lib/includes/Formatters/WikibaseValueFormatterBuilders.php
A
extensions/Wikibase/lib/tests/phpunit/Formatters/CommonsThumbnailFormatterTest.php
M extensions/Wikibase/repo/i18n/es.json
A extensions/Wikibase/repo/i18n/nso.json
M extensions/Wikibase/repo/i18n/qqq.json
M extensions/Wikibase/repo/i18n/sv.json
M extensions/Wikibase/repo/i18n/zh-hans.json
M vendor/composer/autoload_classmap.php
M vendor/composer/installed.json
M vendor/data-values/geo/.travis.yml
M vendor/data-values/geo/Geo.php
M vendor/data-values/geo/README.md
M vendor/data-values/geo/composer.json
A vendor/data-values/geo/phpcs.xml
M vendor/data-values/geo/src/Formatters/GeoCoordinateFormatter.php
M vendor/data-values/geo/src/Parsers/DmCoordinateParser.php
M vendor/data-values/geo/src/Parsers/DmsCoordinateParser.php
M vendor/data-values/geo/src/Values/LatLongValue.php
M vendor/data-values/geo/tests/unit/Formatters/GeoCoordinateFormatterTest.php
M vendor/data-values/geo/tests/unit/Formatters/GlobeCoordinateFormatterTest.php
M vendor/data-values/geo/tests/unit/Parsers/DdCoordinateParserTest.php
M vendor/data-values/geo/tests/unit/Parsers/DmCoordinateParserTest.php
M vendor/data-values/geo/tests/unit/Parsers/DmsCoordinateParserTest.php
M vendor/data-values/geo/tests/unit/Parsers/FloatCoordinateParserTest.php
M vendor/data-values/geo/tests/unit/Parsers/GeoCoordinateParserTest.php
M vendor/data-values/geo/tests/unit/Parsers/GlobeCoordinateParserTest.php
M vendor/data-values/geo/tests/unit/Values/GlobeCoordinateValueTest.php
35 files changed, 388 insertions(+), 73 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikidata
refs/changes/68/318268/1
diff --git a/composer.lock b/composer.lock
index 3e4556d..762a6e4 100644
--- a/composer.lock
+++ b/composer.lock
@@ -285,16 +285,16 @@
},
{
"name": "data-values/geo",
- "version": "1.1.7",
+ "version": "1.1.8",
"source": {
"type": "git",
"url": "https://github.com/DataValues/Geo.git",
- "reference": "31bc304c5b525f59fa7db047adc583d6b86e3ad9"
+ "reference": "6508496f0c6d033220a1d7c6defa52bc7adad082"
},
"dist": {
"type": "zip",
- "url":
"https://api.github.com/repos/DataValues/Geo/zipball/31bc304c5b525f59fa7db047adc583d6b86e3ad9",
- "reference": "31bc304c5b525f59fa7db047adc583d6b86e3ad9",
+ "url":
"https://api.github.com/repos/DataValues/Geo/zipball/6508496f0c6d033220a1d7c6defa52bc7adad082",
+ "reference": "6508496f0c6d033220a1d7c6defa52bc7adad082",
"shasum": ""
},
"require": {
@@ -302,6 +302,9 @@
"data-values/data-values": "~1.0|~0.1",
"data-values/interfaces": "~0.2.0|~0.1.5",
"php": ">=5.3.0"
+ },
+ "require-dev": {
+ "mediawiki/mediawiki-codesniffer": "~0.5"
},
"type": "library",
"extra": {
@@ -344,7 +347,7 @@
"parsers",
"wikidata"
],
- "time": "2016-05-27 15:02:09"
+ "time": "2016-10-12 16:21:06"
},
{
"name": "data-values/interfaces",
@@ -788,12 +791,12 @@
"source": {
"type": "git",
"url":
"https://github.com/wikimedia/mediawiki-extensions-ArticlePlaceholder.git",
- "reference": "7eee3426647fa8995ad6be9574dc73a228bdab4a"
+ "reference": "75aa79f7c3d7f05ee63cd9b0e88efb5a7426c001"
},
"dist": {
"type": "zip",
- "url":
"https://api.github.com/repos/wikimedia/mediawiki-extensions-ArticlePlaceholder/zipball/7eee3426647fa8995ad6be9574dc73a228bdab4a",
- "reference": "7eee3426647fa8995ad6be9574dc73a228bdab4a",
+ "url":
"https://api.github.com/repos/wikimedia/mediawiki-extensions-ArticlePlaceholder/zipball/75aa79f7c3d7f05ee63cd9b0e88efb5a7426c001",
+ "reference": "75aa79f7c3d7f05ee63cd9b0e88efb5a7426c001",
"shasum": ""
},
"require-dev": {
@@ -818,7 +821,7 @@
],
"description": "Provides a special page with Wikibase information
about a certain topic, with invitation to create an article for the topic",
"homepage":
"https://www.mediawiki.org/wiki/Extension:ArticlePlaceholder",
- "time": "2016-10-25 00:01:42"
+ "time": "2016-10-26 16:26:15"
},
{
"name": "propertysuggester/property-suggester",
@@ -1574,12 +1577,12 @@
"source": {
"type": "git",
"url":
"https://github.com/wikimedia/mediawiki-extensions-Wikibase.git",
- "reference": "dd9bdadc68a85ba21a55cd4eebff6515ca6e35bc"
+ "reference": "5de9249704dac230927bb1c51a29af0ae63245d9"
},
"dist": {
"type": "zip",
- "url":
"https://api.github.com/repos/wikimedia/mediawiki-extensions-Wikibase/zipball/dd9bdadc68a85ba21a55cd4eebff6515ca6e35bc",
- "reference": "dd9bdadc68a85ba21a55cd4eebff6515ca6e35bc",
+ "url":
"https://api.github.com/repos/wikimedia/mediawiki-extensions-Wikibase/zipball/5de9249704dac230927bb1c51a29af0ae63245d9",
+ "reference": "5de9249704dac230927bb1c51a29af0ae63245d9",
"shasum": ""
},
"require": {
@@ -1653,7 +1656,7 @@
"wikibaserepo",
"wikidata"
],
- "time": "2016-10-25 21:20:36"
+ "time": "2016-10-27 09:05:05"
},
{
"name": "wikibase/wikimedia-badges",
diff --git a/extensions/ArticlePlaceholder/includes/AboutTopicRenderer.php
b/extensions/ArticlePlaceholder/includes/AboutTopicRenderer.php
index 13a2868..66ed806 100644
--- a/extensions/ArticlePlaceholder/includes/AboutTopicRenderer.php
+++ b/extensions/ArticlePlaceholder/includes/AboutTopicRenderer.php
@@ -80,6 +80,7 @@
/**
* Show content of the ArticlePlaceholder
+ *
* @param ItemId $entityId
* @param Language $language
* @param User $user
@@ -110,6 +111,7 @@
/**
* Adds a button to create an article
+ *
* @param Title $labelTitle
* @param OutputPage $output
*/
@@ -133,6 +135,7 @@
/**
* @param ItemId $entityId
* @param Language $language
+ *
* @return string|null null if the item doesn't have a label
*/
private function getLabel( ItemId $entityId, Language $language ) {
@@ -148,6 +151,7 @@
/**
* Show label as page title
+ *
* @param string $label
* @param OutputPage $output
*/
@@ -157,6 +161,7 @@
/**
* Set language links
+ *
* @param ItemId $entityId
* @param OutputPage $output
*/
@@ -178,6 +183,7 @@
/**
* Set other projects links
+ *
* @param ItemId $itemId
* @param OutputPage $output
*/
diff --git a/extensions/ArticlePlaceholder/includes/ItemNotabilityFilter.php
b/extensions/ArticlePlaceholder/includes/ItemNotabilityFilter.php
index ebde5c1..65b606d 100644
--- a/extensions/ArticlePlaceholder/includes/ItemNotabilityFilter.php
+++ b/extensions/ArticlePlaceholder/includes/ItemNotabilityFilter.php
@@ -3,6 +3,7 @@
namespace ArticlePlaceholder;
use DatabaseBase;
+use ResultWrapper;
use Wikibase\Client\Store\Sql\ConsistentReadConnectionManager;
use Wikibase\DataModel\Entity\ItemId;
use Wikibase\Lib\Store\EntityNamespaceLookup;
@@ -92,6 +93,7 @@
/**
* Get number of statements and claims for a list of ItemIds
+ *
* @param ItemId[] $itemIds
*
* @return array() int[page_title][propname] => value
diff --git
a/extensions/ArticlePlaceholder/includes/Lua/Scribunto_LuaArticlePlaceholderLibrary.php
b/extensions/ArticlePlaceholder/includes/Lua/Scribunto_LuaArticlePlaceholderLibrary.php
index deea20f..5334d8b 100644
---
a/extensions/ArticlePlaceholder/includes/Lua/Scribunto_LuaArticlePlaceholderLibrary.php
+++
b/extensions/ArticlePlaceholder/includes/Lua/Scribunto_LuaArticlePlaceholderLibrary.php
@@ -29,6 +29,7 @@
/**
* Returns an array containing the serialization of a blacklisted
reference property id
+ *
* @return string[]|null Null if
$wgArticlePlaceholderReferencesBlacklist empty or not string
*/
public function getReferencesBlacklist() {
diff --git
a/extensions/ArticlePlaceholder/includes/specials/SpecialCreateTopicPage.php
b/extensions/ArticlePlaceholder/includes/specials/SpecialCreateTopicPage.php
index d7e9de8..167bd83 100644
--- a/extensions/ArticlePlaceholder/includes/specials/SpecialCreateTopicPage.php
+++ b/extensions/ArticlePlaceholder/includes/specials/SpecialCreateTopicPage.php
@@ -58,6 +58,7 @@
* Displays a form that gives the user the information, that the page
(with
* the currently tried title) already exists and that he should
* choose another title.
+ *
* @param Title $title
*/
private function showAlreadyExistsMessage( Title $title ) {
@@ -85,7 +86,9 @@
* Displays a form that with the information that he should
* choose another title. The given message key is used as a
* reason why he need to do this.
+ *
* @param Message $msg
+ *
* @throws MWException
*/
private function showTitleInputWithMessage( Message $msg ) {
diff --git a/extensions/Wikibase/client/i18n/nso.json
b/extensions/Wikibase/client/i18n/nso.json
new file mode 100644
index 0000000..71c3944
--- /dev/null
+++ b/extensions/Wikibase/client/i18n/nso.json
@@ -0,0 +1,8 @@
+{
+ "@metadata": {
+ "authors": [
+ "Mohau"
+ ]
+ },
+ "wikibase-rc-hide-wikidata-show": "Bontšha"
+}
diff --git
a/extensions/Wikibase/client/tests/phpunit/includes/DataAccess/DataAccessSnakFormatterOutputFormatTest.php
b/extensions/Wikibase/client/tests/phpunit/includes/DataAccess/DataAccessSnakFormatterOutputFormatTest.php
index cc1f205..4bebf08 100644
---
a/extensions/Wikibase/client/tests/phpunit/includes/DataAccess/DataAccessSnakFormatterOutputFormatTest.php
+++
b/extensions/Wikibase/client/tests/phpunit/includes/DataAccess/DataAccessSnakFormatterOutputFormatTest.php
@@ -3,7 +3,6 @@
namespace Wikibase\Client\Tests\DataAccess;
use Language;
-use PHPUnit_Framework_TestCase;
use DataValues\DecimalValue;
use DataValues\Geo\Values\GlobeCoordinateValue;
use DataValues\Geo\Values\LatLongValue;
@@ -11,6 +10,8 @@
use DataValues\QuantityValue;
use DataValues\StringValue;
use DataValues\TimeValue;
+use PHPUnit_Framework_TestCase;
+use Title;
use Wikibase\Client\WikibaseClient;
use Wikibase\Client\Usage\UsageAccumulator;
use Wikibase\DataModel\Entity\EntityIdValue;
@@ -121,7 +122,16 @@
}
public function richWikitextSnakProvider() {
+ $namespacedFileName = Title::newFromText( 'A_file name.jpg',
NS_FILE )->getPrefixedText();
+
return [
+ 'commonsMedia' => [
+ '<span>[[' . $namespacedFileName .
'|frameless]]</span>',
+ new PropertyValueSnak(
+ new PropertyId( 'P1' ),
+ new StringValue( 'A_file name.jpg' )
+ )
+ ],
'string' => [
'<span>A string!</span>',
new PropertyValueSnak(
diff --git
a/extensions/Wikibase/lib/includes/Formatters/CommonsThumbnailFormatter.php
b/extensions/Wikibase/lib/includes/Formatters/CommonsThumbnailFormatter.php
new file mode 100644
index 0000000..80d95f5
--- /dev/null
+++ b/extensions/Wikibase/lib/includes/Formatters/CommonsThumbnailFormatter.php
@@ -0,0 +1,56 @@
+<?php
+
+namespace Wikibase\Lib\Formatters;
+
+use DataValues\StringValue;
+use Title;
+use ValueFormatters\ValueFormatter;
+use Wikimedia\Assert\Assert;
+use Wikimedia\Assert\ParameterTypeException;
+
+/**
+ * A rich wikitext formatter for values of the "commonsMedia" property type.
It assumes
+ * InstantCommons is enabled on the wiki consuming the resulting wikitext.
+ *
+ * @see https://www.mediawiki.org/wiki/InstantCommons
+ *
+ * @todo Most feature requests require this to be a SnakFormatter instead of a
ValueFormatter
+ *
+ * @since 0.5
+ *
+ * @license GPL-2.0+
+ * @author Thiemo Mättig
+ */
+class CommonsThumbnailFormatter implements ValueFormatter {
+
+ /**
+ * @see ValueFormatter::format
+ *
+ * @since 0.5
+ *
+ * @param StringValue $value A MediaWiki Commons file name
+ *
+ * @throws ParameterTypeException
+ * @return string Wikitext
+ */
+ public function format( $value ) {
+ Assert::parameterType( StringValue::class, $value, 'value' );
+
+ $fileName = $value->getValue();
+
+ $title = Title::newFromText( $fileName, NS_FILE );
+
+ if ( $title === null ) {
+ return wfEscapeWikiText( $fileName );
+ }
+
+ // TODO: Add the (localized) label of the property the image
came from
+ // TODO: Render multiple images as <gallery>
+ // TODO: Automatically add "upright" to upright images
+ // TODO: Allow the user to override all image parameters
+ $imageParameters = 'frameless';
+
+ return '[[' . $title->getFullText() . '|' . $imageParameters .
']]';
+ }
+
+}
diff --git
a/extensions/Wikibase/lib/includes/Formatters/WikibaseValueFormatterBuilders.php
b/extensions/Wikibase/lib/includes/Formatters/WikibaseValueFormatterBuilders.php
index 47e02ce..255f7a8 100644
---
a/extensions/Wikibase/lib/includes/Formatters/WikibaseValueFormatterBuilders.php
+++
b/extensions/Wikibase/lib/includes/Formatters/WikibaseValueFormatterBuilders.php
@@ -17,6 +17,7 @@
use Wikibase\Formatters\MonolingualHtmlFormatter;
use Wikibase\Formatters\MonolingualTextFormatter;
use Wikibase\Lib\Formatters\EntityIdSiteLinkFormatter;
+use Wikibase\Lib\Formatters\CommonsThumbnailFormatter;
use Wikibase\Lib\Store\EntityTitleLookup;
use Wikibase\Lib\Store\SiteLinkLookup;
@@ -229,7 +230,7 @@
// Use the string formatter without escaping!
return new StringFormatter( $options );
default:
- return $this->escapeValueFormatter( $format,
new StringFormatter( $options ) );
+ return $this->newStringFormatter( $format,
$options );
}
}
@@ -240,11 +241,13 @@
* @return ValueFormatter
*/
public function newCommonsMediaFormatter( $format, FormatterOptions
$options ) {
- //TODO: for FORMAT_WIKI, wikitext image link (inline?
thumbnail? caption?...)
- if ( $this->isHtmlFormat( $format ) ) {
- return new CommonsLinkFormatter( $options );
- } else {
- return $this->newStringFormatter( $format, $options );
+ switch ( $this->getBaseFormat( $format ) ) {
+ case SnakFormatter::FORMAT_HTML:
+ return new CommonsLinkFormatter( $options );
+ case SnakFormatter::FORMAT_WIKI:
+ return new CommonsThumbnailFormatter();
+ default:
+ return $this->newStringFormatter( $format,
$options );
}
}
@@ -255,6 +258,7 @@
* @return ValueFormatter
*/
public function newTimeFormatter( $format, FormatterOptions $options ) {
+ // TODO: Add a wikitext formatter that shows the calendar model
if ( $format === SnakFormatter::FORMAT_HTML_DIFF ) {
return new TimeDetailsFormatter(
$options,
@@ -316,6 +320,8 @@
* @return GlobeCoordinateFormatter
*/
public function newGlobeCoordinateFormatter( $format, FormatterOptions
$options ) {
+ // TODO: Add a wikitext formatter that links to the geohack or
it's proposed replacement,
+ // see https://phabricator.wikimedia.org/T102960
if ( $format === SnakFormatter::FORMAT_HTML_DIFF ) {
return new GlobeCoordinateDetailsFormatter(
$this->getVocabularyUriFormatter( $options ),
@@ -340,6 +346,7 @@
* @return MonolingualHtmlFormatter
*/
public function newMonolingualFormatter( $format, FormatterOptions
$options ) {
+ // TODO: Add a wikitext formatter that shows the language name
if ( $this->isHtmlFormat( $format ) ) {
return new MonolingualHtmlFormatter( $options,
$this->languageNameLookup );
} else {
diff --git
a/extensions/Wikibase/lib/tests/phpunit/Formatters/CommonsThumbnailFormatterTest.php
b/extensions/Wikibase/lib/tests/phpunit/Formatters/CommonsThumbnailFormatterTest.php
new file mode 100644
index 0000000..954a6ec
--- /dev/null
+++
b/extensions/Wikibase/lib/tests/phpunit/Formatters/CommonsThumbnailFormatterTest.php
@@ -0,0 +1,50 @@
+<?php
+
+namespace Wikibase\Lib\Tests\Formatters;
+
+use DataValues\StringValue;
+use InvalidArgumentException;
+use MediaWikiTestCase;
+use MediaWiki\MediaWikiServices;
+use Wikibase\Lib\Formatters\CommonsThumbnailFormatter;
+
+/**
+ * @covers Wikibase\Lib\CommonsThumbnailFormatter
+ *
+ * @group ValueFormatters
+ * @group WikibaseLib
+ * @group Wikibase
+ *
+ * @license GPL-2.0+
+ * @author Thiemo Mättig
+ */
+class CommonsThumbnailFormatterTest extends MediaWikiTestCase {
+
+ public function fileNameProvider() {
+ $titleFormatter =
MediaWikiServices::getInstance()->getTitleFormatter();
+ $nsName = $titleFormatter->getNamespaceName( NS_FILE, 'foo' );
+
+ return [
+ [ '', '' ],
+ [ 'A.jpg', '[[' . $nsName . ':A.jpg|frameless]]' ],
+ [ 'File:A.jpg', '[[' . $nsName . ':A.jpg|frameless]]' ],
+ [ '<INVALID>', '<INVALID>' ],
+ ];
+ }
+
+ /**
+ * @dataProvider fileNameProvider
+ */
+ public function testFormat( $fileName, $expected ) {
+ $value = new StringValue( $fileName );
+ $formatter = new CommonsThumbnailFormatter();
+ $this->assertSame( $expected, $formatter->format( $value ) );
+ }
+
+ public function testFormatError() {
+ $formatter = new CommonsThumbnailFormatter();
+ $this->setExpectedException( InvalidArgumentException::class );
+ $formatter->format( 'Image.jpg' );
+ }
+
+}
diff --git a/extensions/Wikibase/repo/i18n/es.json
b/extensions/Wikibase/repo/i18n/es.json
index ae5b1ff..70cdd3b 100644
--- a/extensions/Wikibase/repo/i18n/es.json
+++ b/extensions/Wikibase/repo/i18n/es.json
@@ -49,6 +49,9 @@
"wikibase-addreference": "añadir referencia",
"wikibase-save-inprogress": "Guardando...",
"wikibase-remove-inprogress": "Eliminando...",
+ "wikibase-statementlistview-add": "añadir",
+ "wikibase-statementlistview-add-tooltip": "Añadir un valor nuevo",
+ "wikibase-statementgrouplistview-add": "añadir",
"wikibase-entitytermsview-entitytermsforlanguagelistview-toggler": "En
más idiomas",
"wikibase-entitytermsview-entitytermsforlanguagelistview-configure-link-label":
"Configurar",
"wikibase-setting-entitytermsview-showEntitytermslistview": "Mostrar
etiquetas, alias y descripciones en todos mis idiomas al cargar la página",
diff --git a/extensions/Wikibase/repo/i18n/nso.json
b/extensions/Wikibase/repo/i18n/nso.json
new file mode 100644
index 0000000..aa97ac8
--- /dev/null
+++ b/extensions/Wikibase/repo/i18n/nso.json
@@ -0,0 +1,8 @@
+{
+ "@metadata": {
+ "authors": [
+ "Mohau"
+ ]
+ },
+ "wikibase-edit": "fetola"
+}
diff --git a/extensions/Wikibase/repo/i18n/qqq.json
b/extensions/Wikibase/repo/i18n/qqq.json
index e1c4270..501defa 100644
--- a/extensions/Wikibase/repo/i18n/qqq.json
+++ b/extensions/Wikibase/repo/i18n/qqq.json
@@ -57,9 +57,9 @@
"wikibase-addreference": "Label of the link to add a reference to a
statement (see [[d:Wikidata:Glossary]]).",
"wikibase-save-inprogress": "[[File:Screenshot WikidataRepo 2012-05-25
L.png|right|350px]]\n[[File:Screenshot WikidataRepo 2012-05-25
J.png|right|350px]]\n[[File:Screenshot WikidataRepo 2012-05-25
K.png|right|350px]]\nThis is a generic placeholder message used while a save is
in progress, and replaces the save and cancel links.\n{{Identical|Saving}}",
"wikibase-remove-inprogress": "[[File:Screenshot WikidataRepo
2012-05-25 L.png|right|350px]]\n[[File:Screenshot WikidataRepo 2012-05-25
M.png|right|350px]]\nThis is a generic placeholder message used while a remove
is in progress, and replaces the edit and remove.",
- "wikibase-statementlistview-add": "This is a text used for a link that
allows the user to add a new statement with the existing property id.",
+ "wikibase-statementlistview-add": "This is a text used for a link that
allows the user to add a new statement with the existing property
id.\n{{Identical|Add}}",
"wikibase-statementlistview-add-tooltip": "This is a tooltip text used
for a link that allows the user to add a new statement with the existing
property id.",
- "wikibase-statementgrouplistview-add": "This is a text used for a link
that allows the user to add a new statement.",
+ "wikibase-statementgrouplistview-add": "This is a text used for a link
that allows the user to add a new statement.\n{{Identical|Add}}",
"wikibase-statementgrouplistview-add-tooltip": "This is a tooltip text
used for a link that allows the user to add a new statement.",
"wikibase-entitytermsview-entitytermsforlanguagelistview-toggler":
"Link to show/hide the list of labels, aliases and descriptions in the user's
languages. The list is part of an entity's user interface representation header
and may be used to view and alter labels, aliases and descriptions in the
languages configured by the user.",
"wikibase-entitytermsview-entitytermsforlanguagelistview-configure-link": "Link
to (URL of) the help page providing information about how to configure the list
of languages. The link is shown next to the link to show/hide the language list
if the user has JavaScript enabled and not yet configured one or more
[[mw:Extension:Babel|Babel boxes]] on his/her user page.",
diff --git a/extensions/Wikibase/repo/i18n/sv.json
b/extensions/Wikibase/repo/i18n/sv.json
index 2bf8964..f20653b 100644
--- a/extensions/Wikibase/repo/i18n/sv.json
+++ b/extensions/Wikibase/repo/i18n/sv.json
@@ -28,6 +28,9 @@
"wikibase-addreference": "lägg till referens",
"wikibase-save-inprogress": "Sparar...",
"wikibase-remove-inprogress": "Tar bort...",
+ "wikibase-statementlistview-add": "lägg till",
+ "wikibase-statementlistview-add-tooltip": "Lägg till ett nytt värde",
+ "wikibase-statementgrouplistview-add": "lägg till",
"wikibase-entitytermsview-entitytermsforlanguagelistview-toggler":
"Fler språk",
"wikibase-entitytermsview-entitytermsforlanguagelistview-configure-link-label":
"Konfigurera",
"wikibase-setting-entitytermsview-showEntitytermslistview": "Visa
etiketter, alias och beskrivningar på alla mina språk vid sidladdning",
diff --git a/extensions/Wikibase/repo/i18n/zh-hans.json
b/extensions/Wikibase/repo/i18n/zh-hans.json
index 1c06da3..0d6a068 100644
--- a/extensions/Wikibase/repo/i18n/zh-hans.json
+++ b/extensions/Wikibase/repo/i18n/zh-hans.json
@@ -40,6 +40,10 @@
"wikibase-addreference": "添加参考",
"wikibase-save-inprogress": "正在保存...",
"wikibase-remove-inprogress": "正在删除...",
+ "wikibase-statementlistview-add": "添加",
+ "wikibase-statementlistview-add-tooltip": "添加新值",
+ "wikibase-statementgrouplistview-add": "添加",
+ "wikibase-statementgrouplistview-add-tooltip": "添加新声明",
"wikibase-entitytermsview-entitytermsforlanguagelistview-toggler":
"更多语言",
"wikibase-entitytermsview-entitytermsforlanguagelistview-configure-link-label":
"配置",
"wikibase-setting-entitytermsview-showEntitytermslistview":
"在页面加载时显示我的所有语言的标签、别名和描述",
diff --git a/vendor/composer/autoload_classmap.php
b/vendor/composer/autoload_classmap.php
index ff80d7f..0b778da 100644
--- a/vendor/composer/autoload_classmap.php
+++ b/vendor/composer/autoload_classmap.php
@@ -806,6 +806,7 @@
'Wikibase\\Lib\\EscapingValueFormatter' => $baseDir .
'/extensions/Wikibase/lib/includes/Formatters/EscapingValueFormatter.php',
'Wikibase\\Lib\\FieldPropertyInfoProvider' => $baseDir .
'/extensions/Wikibase/lib/includes/Store/FieldPropertyInfoProvider.php',
'Wikibase\\Lib\\FormatterLabelDescriptionLookupFactory' => $baseDir .
'/extensions/Wikibase/lib/includes/Formatters/FormatterLabelDescriptionLookupFactory.php',
+ 'Wikibase\\Lib\\Formatters\\CommonsThumbnailFormatter' => $baseDir .
'/extensions/Wikibase/lib/includes/Formatters/CommonsThumbnailFormatter.php',
'Wikibase\\Lib\\Formatters\\EntityIdSiteLinkFormatter' => $baseDir .
'/extensions/Wikibase/lib/includes/Formatters/EntityIdSiteLinkFormatter.php',
'Wikibase\\Lib\\Formatters\\ErrorHandlingSnakFormatter' => $baseDir .
'/extensions/Wikibase/lib/includes/Formatters/ErrorHandlingSnakFormatter.php',
'Wikibase\\Lib\\Formatters\\HtmlExternalIdentifierFormatter' => $baseDir .
'/extensions/Wikibase/lib/includes/Formatters/HtmlExternalIdentifierFormatter.php',
@@ -901,6 +902,7 @@
'Wikibase\\Lib\\Tests\\EntityTypeDefinitionsTest' => $baseDir .
'/extensions/Wikibase/lib/tests/phpunit/EntityTypeDefinitionsTest.php',
'Wikibase\\Lib\\Tests\\EntityTypesTest' => $baseDir .
'/extensions/Wikibase/lib/tests/phpunit/EntityTypesTest.php',
'Wikibase\\Lib\\Tests\\FieldPropertyInfoProviderTest' => $baseDir .
'/extensions/Wikibase/lib/tests/phpunit/Store/FieldPropertyInfoProviderTest.php',
+ 'Wikibase\\Lib\\Tests\\Formatters\\CommonsThumbnailFormatterTest' =>
$baseDir .
'/extensions/Wikibase/lib/tests/phpunit/Formatters/CommonsThumbnailFormatterTest.php',
'Wikibase\\Lib\\Tests\\Formatters\\EntityIdSiteLinkFormatterTest' =>
$baseDir .
'/extensions/Wikibase/lib/tests/phpunit/Formatters/EntityIdSiteLinkFormatterTest.php',
'Wikibase\\Lib\\Tests\\LanguageFallbackChainFactoryTest' => $baseDir .
'/extensions/Wikibase/lib/tests/phpunit/LanguageFallbackChainFactoryTest.php',
'Wikibase\\Lib\\Tests\\LanguageFallbackChainTest' => $baseDir .
'/extensions/Wikibase/lib/tests/phpunit/LanguageFallbackChainTest.php',
diff --git a/vendor/composer/installed.json b/vendor/composer/installed.json
index 51d7a94..437371e 100644
--- a/vendor/composer/installed.json
+++ b/vendor/composer/installed.json
@@ -115,19 +115,19 @@
"source": {
"type": "git",
"url":
"https://github.com/wikimedia/mediawiki-extensions-ArticlePlaceholder.git",
- "reference": "7eee3426647fa8995ad6be9574dc73a228bdab4a"
+ "reference": "75aa79f7c3d7f05ee63cd9b0e88efb5a7426c001"
},
"dist": {
"type": "zip",
- "url":
"https://api.github.com/repos/wikimedia/mediawiki-extensions-ArticlePlaceholder/zipball/7eee3426647fa8995ad6be9574dc73a228bdab4a",
- "reference": "7eee3426647fa8995ad6be9574dc73a228bdab4a",
+ "url":
"https://api.github.com/repos/wikimedia/mediawiki-extensions-ArticlePlaceholder/zipball/75aa79f7c3d7f05ee63cd9b0e88efb5a7426c001",
+ "reference": "75aa79f7c3d7f05ee63cd9b0e88efb5a7426c001",
"shasum": ""
},
"require-dev": {
"jakub-onderka/php-parallel-lint": "0.9.2",
"mediawiki/mediawiki-codesniffer": "0.7.2"
},
- "time": "2016-10-25 00:01:42",
+ "time": "2016-10-26 16:26:15",
"type": "mediawiki-extension",
"installation-source": "dist",
"autoload": {
@@ -1227,17 +1227,17 @@
},
{
"name": "data-values/geo",
- "version": "1.1.7",
- "version_normalized": "1.1.7.0",
+ "version": "1.1.8",
+ "version_normalized": "1.1.8.0",
"source": {
"type": "git",
"url": "https://github.com/DataValues/Geo.git",
- "reference": "31bc304c5b525f59fa7db047adc583d6b86e3ad9"
+ "reference": "6508496f0c6d033220a1d7c6defa52bc7adad082"
},
"dist": {
"type": "zip",
- "url":
"https://api.github.com/repos/DataValues/Geo/zipball/31bc304c5b525f59fa7db047adc583d6b86e3ad9",
- "reference": "31bc304c5b525f59fa7db047adc583d6b86e3ad9",
+ "url":
"https://api.github.com/repos/DataValues/Geo/zipball/6508496f0c6d033220a1d7c6defa52bc7adad082",
+ "reference": "6508496f0c6d033220a1d7c6defa52bc7adad082",
"shasum": ""
},
"require": {
@@ -1246,7 +1246,10 @@
"data-values/interfaces": "~0.2.0|~0.1.5",
"php": ">=5.3.0"
},
- "time": "2016-05-27 15:02:09",
+ "require-dev": {
+ "mediawiki/mediawiki-codesniffer": "~0.5"
+ },
+ "time": "2016-10-12 16:21:06",
"type": "library",
"extra": {
"branch-alias": {
@@ -1348,12 +1351,12 @@
"source": {
"type": "git",
"url":
"https://github.com/wikimedia/mediawiki-extensions-Wikibase.git",
- "reference": "dd9bdadc68a85ba21a55cd4eebff6515ca6e35bc"
+ "reference": "5de9249704dac230927bb1c51a29af0ae63245d9"
},
"dist": {
"type": "zip",
- "url":
"https://api.github.com/repos/wikimedia/mediawiki-extensions-Wikibase/zipball/dd9bdadc68a85ba21a55cd4eebff6515ca6e35bc",
- "reference": "dd9bdadc68a85ba21a55cd4eebff6515ca6e35bc",
+ "url":
"https://api.github.com/repos/wikimedia/mediawiki-extensions-Wikibase/zipball/5de9249704dac230927bb1c51a29af0ae63245d9",
+ "reference": "5de9249704dac230927bb1c51a29af0ae63245d9",
"shasum": ""
},
"require": {
@@ -1386,7 +1389,7 @@
"jakub-onderka/php-parallel-lint": "0.9.2",
"mediawiki/mediawiki-codesniffer": "0.4.0|0.5.0"
},
- "time": "2016-10-25 21:20:36",
+ "time": "2016-10-27 09:05:05",
"type": "mediawiki-extension",
"installation-source": "dist",
"autoload": {
diff --git a/vendor/data-values/geo/.travis.yml
b/vendor/data-values/geo/.travis.yml
index 29da81f..7be20c6 100644
--- a/vendor/data-values/geo/.travis.yml
+++ b/vendor/data-values/geo/.travis.yml
@@ -5,7 +5,8 @@
- 5.4
- 5.5
- 5.6
- - 7
+ - 7.0
+ - 7.1
- hhvm
before_script:
@@ -14,6 +15,12 @@
script:
- phpunit
+after_success:
+ - if [[ "`phpenv version-name`" != "7.0" ]]; then exit 0; fi
+ - vendor/bin/phpunit --coverage-clover coverage.clover
+ - wget https://scrutinizer-ci.com/ocular.phar
+ - php ocular.phar code-coverage:upload --format=php-clover coverage.clover
+
cache:
directories:
- $HOME/.composer/cache
diff --git a/vendor/data-values/geo/Geo.php b/vendor/data-values/geo/Geo.php
index 56ca247..d49bdaa 100644
--- a/vendor/data-values/geo/Geo.php
+++ b/vendor/data-values/geo/Geo.php
@@ -15,7 +15,7 @@
return 1;
}
-define( 'DATAVALUES_GEO_VERSION', '1.1.7' );
+define( 'DATAVALUES_GEO_VERSION', '1.1.8' );
if ( defined( 'MEDIAWIKI' ) ) {
$GLOBALS['wgExtensionCredits']['datavalues'][] = array(
diff --git a/vendor/data-values/geo/README.md b/vendor/data-values/geo/README.md
index 9269199..e0f293a 100644
--- a/vendor/data-values/geo/README.md
+++ b/vendor/data-values/geo/README.md
@@ -93,6 +93,11 @@
## Release notes
+### 1.1.8 (2016-10-12)
+
+* Fixed an IEEE issue in `GeoCoordinateFormatter`
+* Fixed a PHP 7.1 compatibility issue in a test
+
### 1.1.7 (2016-05-25)
* Made minor documentation improvements
diff --git a/vendor/data-values/geo/composer.json
b/vendor/data-values/geo/composer.json
index 9bd5cd8..b450e66 100644
--- a/vendor/data-values/geo/composer.json
+++ b/vendor/data-values/geo/composer.json
@@ -34,6 +34,9 @@
"data-values/interfaces": "~0.2.0|~0.1.5",
"data-values/common": "~0.3.0|~0.2.0"
},
+ "require-dev": {
+ "mediawiki/mediawiki-codesniffer": "~0.5"
+ },
"autoload": {
"files" : [
"Geo.php"
@@ -46,5 +49,10 @@
"branch-alias": {
"dev-master": "1.1.x-dev"
}
+ },
+ "scripts": {
+ "phpcs": [
+ "vendor/bin/phpcs src/* tests/* --standard=phpcs.xml
-sp"
+ ]
}
}
diff --git a/vendor/data-values/geo/phpcs.xml b/vendor/data-values/geo/phpcs.xml
new file mode 100644
index 0000000..636223f
--- /dev/null
+++ b/vendor/data-values/geo/phpcs.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0"?>
+<ruleset name="DataValuesGeo">
+ <!-- See
https://github.com/wikimedia/mediawiki-tools-codesniffer/blob/master/MediaWiki/ruleset.xml
-->
+ <rule ref="vendor/mediawiki/mediawiki-codesniffer/MediaWiki">
+ <exclude name="Generic.Arrays.DisallowLongArraySyntax" />
+ <exclude
name="MediaWiki.WhiteSpace.SpaceAfterControlStructure.Incorrect" />
+ <exclude name="MediaWiki.WhiteSpace.SpaceyParenthesis" />
+ </rule>
+
+ <rule ref="Generic.Files.LineLength">
+ <properties>
+ <property name="lineLimit" value="113" />
+ </properties>
+ </rule>
+
+ <arg name="extensions" value="php" />
+</ruleset>
diff --git a/vendor/data-values/geo/src/Formatters/GeoCoordinateFormatter.php
b/vendor/data-values/geo/src/Formatters/GeoCoordinateFormatter.php
index c9bde33..47bdf84 100644
--- a/vendor/data-values/geo/src/Formatters/GeoCoordinateFormatter.php
+++ b/vendor/data-values/geo/src/Formatters/GeoCoordinateFormatter.php
@@ -165,14 +165,28 @@
);
}
+ /**
+ * @param string $coordinate
+ * @param string $positiveSymbol
+ * @param string $negativeSymbol
+ *
+ * @return string
+ */
private function makeDirectionalIfNeeded( $coordinate, $positiveSymbol,
$negativeSymbol ) {
if ( $this->options->getOption( self::OPT_DIRECTIONAL ) ) {
- return $this->makeDirectional( $coordinate ,
$positiveSymbol, $negativeSymbol);
+ return $this->makeDirectional( $coordinate,
$positiveSymbol, $negativeSymbol );
}
return $coordinate;
}
+ /**
+ * @param string $coordinate
+ * @param string $positiveSymbol
+ * @param string $negativeSymbol
+ *
+ * @return string
+ */
private function makeDirectional( $coordinate, $positiveSymbol,
$negativeSymbol ) {
$isNegative = substr( $coordinate, 0, 1 ) === '-';
@@ -299,11 +313,11 @@
* (60 for minutes, 3600 for seconds)
* @param float $degreePrecision
*
- * @return float The number of digits to show after the decimal point
+ * @return int The number of digits to show after the decimal point
* (resp. before, if the result is negative).
*/
private function getSignificantDigits( $unitsPerDegree,
$degreePrecision ) {
- return ceil( -log10( $unitsPerDegree * $degreePrecision ) );
+ return (int)ceil( -log10( $unitsPerDegree * $degreePrecision )
);
}
/**
@@ -313,10 +327,8 @@
* @return string
*/
private function formatNumber( $number, $digits = 0 ) {
- //TODO: use NumberLocalizer
- return sprintf( $digits > 0
- ? '%.' . (int)$digits . 'F'
- : '%d', $number );
+ // TODO: use NumberLocalizer
+ return sprintf( '%.' . ( $digits > 0 ? $digits : 0 ) . 'F',
$number );
}
}
diff --git a/vendor/data-values/geo/src/Parsers/DmCoordinateParser.php
b/vendor/data-values/geo/src/Parsers/DmCoordinateParser.php
index 34cfd4d..7498d25 100644
--- a/vendor/data-values/geo/src/Parsers/DmCoordinateParser.php
+++ b/vendor/data-values/geo/src/Parsers/DmCoordinateParser.php
@@ -87,7 +87,7 @@
if( $match ) {
$detectedMinute = true;
- } else {
+ } else {
$match = preg_match( '/^(-)?' .
$regExpLoose . '$/i', $segment );
}
}
diff --git a/vendor/data-values/geo/src/Parsers/DmsCoordinateParser.php
b/vendor/data-values/geo/src/Parsers/DmsCoordinateParser.php
index fa13437..3694871 100644
--- a/vendor/data-values/geo/src/Parsers/DmsCoordinateParser.php
+++ b/vendor/data-values/geo/src/Parsers/DmsCoordinateParser.php
@@ -92,7 +92,7 @@
if( $match ) {
$detectedSecond = true;
- } else {
+ } else {
$match = preg_match( '/^(-)?' .
$regExpLoose . '$/i', $segment );
}
}
@@ -153,8 +153,7 @@
if ( $minutePosition === false ) {
$minutes = 0;
- }
- else {
+ } else {
$degSignLength = strlen( $this->getOption(
self::OPT_DEGREE_SYMBOL ) );
$minuteLength = $minutePosition - $degreePosition -
$degSignLength;
$minutes = substr( $coordinateSegment, $degreePosition
+ $degSignLength, $minuteLength );
@@ -164,8 +163,7 @@
if ( $secondPosition === false ) {
$seconds = 0;
- }
- else {
+ } else {
$secondLength = $secondPosition - $minutePosition - 1;
$seconds = substr( $coordinateSegment, $minutePosition
+ 1, $secondLength );
}
diff --git a/vendor/data-values/geo/src/Values/LatLongValue.php
b/vendor/data-values/geo/src/Values/LatLongValue.php
index 7cb34a6..d389faa 100644
--- a/vendor/data-values/geo/src/Values/LatLongValue.php
+++ b/vendor/data-values/geo/src/Values/LatLongValue.php
@@ -192,7 +192,7 @@
*
* @since 0.1
*
- * @param float[] $data
+ * @param array $data
*
* @return self
*/
diff --git
a/vendor/data-values/geo/tests/unit/Formatters/GeoCoordinateFormatterTest.php
b/vendor/data-values/geo/tests/unit/Formatters/GeoCoordinateFormatterTest.php
index 9833799..7d93f4e 100644
---
a/vendor/data-values/geo/tests/unit/Formatters/GeoCoordinateFormatterTest.php
+++
b/vendor/data-values/geo/tests/unit/Formatters/GeoCoordinateFormatterTest.php
@@ -58,6 +58,26 @@
10,
'-60, 40'
),
+ 'rounding degrees down' => array(
+ new LatLongValue( -14.9, 14.9 ),
+ 10,
+ '-10, 10'
+ ),
+ 'rounding degrees up' => array(
+ new LatLongValue( -15, 15 ),
+ 10,
+ '-20, 20'
+ ),
+ 'rounding fractions down' => array(
+ new LatLongValue( -0.049, 0.049 ),
+ 0.1,
+ '0, 0'
+ ),
+ 'rounding fractions up' => array(
+ new LatLongValue( -0.05, 0.05 ),
+ 0.1,
+ '-0.1, 0.1'
+ ),
);
}
@@ -123,6 +143,26 @@
10,
'-60°, 40°'
),
+ 'rounding degrees down' => array(
+ new LatLongValue( -14.9, 14.9 ),
+ 10,
+ '-10°, 10°'
+ ),
+ 'rounding degrees up' => array(
+ new LatLongValue( -15, 15 ),
+ 10,
+ '-20°, 20°'
+ ),
+ 'rounding fractions down' => array(
+ new LatLongValue( -0.049, 0.049 ),
+ 0.1,
+ '0.0°, 0.0°'
+ ),
+ 'rounding fractions up' => array(
+ new LatLongValue( -0.05, 0.05 ),
+ 0.1,
+ '-0.1°, 0.1°'
+ ),
);
}
@@ -182,7 +222,7 @@
'ten minutes' => array(
new LatLongValue( -55.755786, 37.25633 ),
10.0/60,
- '-55° 49\', 37° 19\''
+ '-55° 50\', 37° 20\''
),
'fifty minutes' => array(
new LatLongValue( -55.755786, 37.25633 ),
@@ -198,6 +238,26 @@
new LatLongValue( -55.755786, 37.25633 ),
10,
'-60°, 40°'
+ ),
+ 'rounding minutes down' => array(
+ new LatLongValue( -14.9 / 60, 14.9 / 60 ),
+ 10 / 60,
+ '-0° 10\', 0° 10\''
+ ),
+ 'rounding minutes up' => array(
+ new LatLongValue( -15 / 60, 15 / 60 ),
+ 10 / 60,
+ '-0° 20\', 0° 20\''
+ ),
+ 'rounding fractions down' => array(
+ new LatLongValue( -0.049 / 60, 0.049 / 60 ),
+ 0.1 / 60,
+ '0° 0.0\', 0° 0.0\''
+ ),
+ 'rounding fractions up' => array(
+ new LatLongValue( -0.05 / 60, 0.05 / 60 ),
+ 0.1 / 60,
+ '-0° 0.1\', 0° 0.1\''
),
);
}
@@ -275,10 +335,40 @@
1,
'-56°, 37°'
),
+ 'degree/100, case A' => array(
+ new LatLongValue( 52.01, 10.01 ),
+ 0.01,
+ '52° 0\' 36", 10° 0\' 36"'
+ ),
+ 'degree/100, case B' => array(
+ new LatLongValue( 52.02, 10.02 ),
+ 0.01,
+ '52° 1\' 12", 10° 1\' 12"'
+ ),
'ten degrees' => array(
new LatLongValue( -55.755786, 37.25633 ),
10,
'-60°, 40°'
+ ),
+ 'rounding seconds down' => array(
+ new LatLongValue( -14.9 / 3600, 14.9 / 3600 ),
+ 10 / 3600,
+ '-0° 0\' 10", 0° 0\' 10"'
+ ),
+ 'rounding seconds up' => array(
+ new LatLongValue( -15 / 3600, 15 / 3600 ),
+ 10 / 3600,
+ '-0° 0\' 20", 0° 0\' 20"'
+ ),
+ 'rounding fractions down' => array(
+ new LatLongValue( -0.049 / 3600, 0.049 / 3600 ),
+ 0.1 / 3600,
+ '0° 0\' 0.0", 0° 0\' 0.0"'
+ ),
+ 'rounding fractions up' => array(
+ new LatLongValue( -0.05 / 3600, 0.05 / 3600 ),
+ 0.1 / 3600,
+ '-0° 0\' 0.1", 0° 0\' 0.1"'
),
);
}
@@ -302,14 +392,14 @@
private function assertFormatsCorrectly( LatLongValue $latLong,
FormatterOptions $options, $expected ) {
$formatter = new GeoCoordinateFormatter( $options );
- $this->assertEquals(
+ $this->assertSame(
$expected,
$formatter->format( $latLong ),
'format()'
);
$precision = $options->getOption(
GeoCoordinateFormatter::OPT_PRECISION );
- $this->assertEquals(
+ $this->assertSame(
$expected,
$formatter->formatLatLongValue( $latLong, $precision ),
'formatLatLongValue()'
@@ -326,7 +416,7 @@
// NOTE: $parsed may be != $coord, because of rounding, so we
can't compare directly.
$formattedParsed = $formatter->format( $parsed );
- $this->assertEquals( $formatted, $formattedParsed );
+ $this->assertSame( $formatted, $formattedParsed );
}
public function testDirectionalOptionGetsAppliedForDecimalMinutes() {
@@ -494,7 +584,7 @@
$formatter = new GeoCoordinateFormatter( $options );
$formatted = $formatter->format( new LatLongValue( 1.2, 3.4 ) );
- $this->assertEquals( '1.2, 3.4', $formatted );
+ $this->assertSame( '1.2, 3.4', $formatted );
}
/**
@@ -504,7 +594,7 @@
$formatter = new GeoCoordinateFormatter( new FormatterOptions()
);
$formatted = $formatter->formatLatLongValue( new LatLongValue(
1.2, 3.4 ), $precision );
- $this->assertEquals( '1.2, 3.4', $formatted );
+ $this->assertSame( '1.2, 3.4', $formatted );
}
public function invalidPrecisionProvider() {
diff --git
a/vendor/data-values/geo/tests/unit/Formatters/GlobeCoordinateFormatterTest.php
b/vendor/data-values/geo/tests/unit/Formatters/GlobeCoordinateFormatterTest.php
index 2b1b6fe..7f45e47 100644
---
a/vendor/data-values/geo/tests/unit/Formatters/GlobeCoordinateFormatterTest.php
+++
b/vendor/data-values/geo/tests/unit/Formatters/GlobeCoordinateFormatterTest.php
@@ -124,7 +124,11 @@
/**
* @dataProvider validProvider
*/
- public function testFormatterRoundTrip( GlobeCoordinateValue $coord,
$expectedValue, FormatterOptions $options ) {
+ public function testFormatterRoundTrip(
+ GlobeCoordinateValue $coord,
+ $expectedValue,
+ FormatterOptions $options
+ ) {
$formatter = new GlobeCoordinateFormatter( $options );
$parser = new GlobeCoordinateParser(
diff --git
a/vendor/data-values/geo/tests/unit/Parsers/DdCoordinateParserTest.php
b/vendor/data-values/geo/tests/unit/Parsers/DdCoordinateParserTest.php
index 6926379..a2a31fd 100644
--- a/vendor/data-values/geo/tests/unit/Parsers/DdCoordinateParserTest.php
+++ b/vendor/data-values/geo/tests/unit/Parsers/DdCoordinateParserTest.php
@@ -11,7 +11,6 @@
*
* @group ValueParsers
* @group DataValueExtensions
- * @group GeoCoordinateParserTest
*
* @license GPL-2.0+
* @author Jeroen De Dauw < [email protected] >
diff --git
a/vendor/data-values/geo/tests/unit/Parsers/DmCoordinateParserTest.php
b/vendor/data-values/geo/tests/unit/Parsers/DmCoordinateParserTest.php
index 4275494..e477e8f 100644
--- a/vendor/data-values/geo/tests/unit/Parsers/DmCoordinateParserTest.php
+++ b/vendor/data-values/geo/tests/unit/Parsers/DmCoordinateParserTest.php
@@ -11,7 +11,6 @@
*
* @group ValueParsers
* @group DataValueExtensions
- * @group GeoCoordinateParserTest
*
* @license GPL-2.0+
* @author Jeroen De Dauw < [email protected] >
diff --git
a/vendor/data-values/geo/tests/unit/Parsers/DmsCoordinateParserTest.php
b/vendor/data-values/geo/tests/unit/Parsers/DmsCoordinateParserTest.php
index 84f5109..482e087 100644
--- a/vendor/data-values/geo/tests/unit/Parsers/DmsCoordinateParserTest.php
+++ b/vendor/data-values/geo/tests/unit/Parsers/DmsCoordinateParserTest.php
@@ -11,7 +11,6 @@
*
* @group ValueParsers
* @group DataValueExtensions
- * @group GeoCoordinateParserTest
*
* @license GPL-2.0+
* @author Jeroen De Dauw < [email protected] >
diff --git
a/vendor/data-values/geo/tests/unit/Parsers/FloatCoordinateParserTest.php
b/vendor/data-values/geo/tests/unit/Parsers/FloatCoordinateParserTest.php
index d28e27e..d84c638 100644
--- a/vendor/data-values/geo/tests/unit/Parsers/FloatCoordinateParserTest.php
+++ b/vendor/data-values/geo/tests/unit/Parsers/FloatCoordinateParserTest.php
@@ -11,7 +11,6 @@
*
* @group ValueParsers
* @group DataValueExtensions
- * @group GeoCoordinateParserTest
*
* @license GPL-2.0+
* @author Jeroen De Dauw < [email protected] >
diff --git
a/vendor/data-values/geo/tests/unit/Parsers/GeoCoordinateParserTest.php
b/vendor/data-values/geo/tests/unit/Parsers/GeoCoordinateParserTest.php
index a491cb3..dc69b4d 100644
--- a/vendor/data-values/geo/tests/unit/Parsers/GeoCoordinateParserTest.php
+++ b/vendor/data-values/geo/tests/unit/Parsers/GeoCoordinateParserTest.php
@@ -11,7 +11,6 @@
*
* @group ValueParsers
* @group DataValueExtensions
- * @group GeoCoordinateParserTest
*
* @license GPL-2.0+
* @author Jeroen De Dauw < [email protected] >
diff --git
a/vendor/data-values/geo/tests/unit/Parsers/GlobeCoordinateParserTest.php
b/vendor/data-values/geo/tests/unit/Parsers/GlobeCoordinateParserTest.php
index cc61c8a..6cbaf82 100644
--- a/vendor/data-values/geo/tests/unit/Parsers/GlobeCoordinateParserTest.php
+++ b/vendor/data-values/geo/tests/unit/Parsers/GlobeCoordinateParserTest.php
@@ -13,7 +13,6 @@
*
* @group ValueParsers
* @group DataValueExtensions
- * @group GeoCoordinateParserTest
*
* @license GPL-2.0+
* @author Jeroen De Dauw < [email protected] >
@@ -82,11 +81,11 @@
' S 5.5° W 37°' => array( -5.5, -37, 0.1 ),
// DMS
- '55° 45\' 20.8296", 37° 37\' 3.4788"' => array(
55.755786, 37.617633, 1 / 36000000 ),
- '55° 45\' 20.8296", -37° 37\' 3.4788"' => array(
55.755786, -37.617633, 1 / 36000000 ),
- '-55° 45\' 20.8296", -37° 37\' 3.4788"' => array(
-55.755786, -37.617633, 1 / 36000000 ),
- '-55° 45\' 20.8296", 37° 37\' 3.4788"' => array(
-55.755786, 37.617633, 1 / 36000000 ),
- '-55° 45\' 20.8296", 37° 37\' 3.4788" ' => array(
-55.755786, 37.617633, 1 / 36000000 ),
+ '55° 45\' 20.8296", 37° 37\' 3.4788"' => array(
55.755786, 37.617633, 0.0001 / 3600 ),
+ '55° 45\' 20.8296", -37° 37\' 3.4788"' => array(
55.755786, -37.617633, 0.0001 / 3600 ),
+ '-55° 45\' 20.8296", -37° 37\' 3.4788"' => array(
-55.755786, -37.617633, 0.0001 / 3600 ),
+ '-55° 45\' 20.8296", 37° 37\' 3.4788"' => array(
-55.755786, 37.617633, 0.0001 / 3600 ),
+ '-55° 45\' 20.8296", 37° 37\' 3.4788" ' => array(
-55.755786, 37.617633, 0.0001 / 3600 ),
'55° 0\' 0", 37° 0\' 0"' => array( 55, 37, 1 / 3600 ),
'55° 30\' 0", 37° 30\' 0"' => array( 55.5, 37.5, 1 /
3600 ),
'55° 0\' 18", 37° 0\' 18"' => array( 55.005, 37.005, 1
/ 3600 ),
diff --git
a/vendor/data-values/geo/tests/unit/Values/GlobeCoordinateValueTest.php
b/vendor/data-values/geo/tests/unit/Values/GlobeCoordinateValueTest.php
index b8b1787..b3198ef 100644
--- a/vendor/data-values/geo/tests/unit/Values/GlobeCoordinateValueTest.php
+++ b/vendor/data-values/geo/tests/unit/Values/GlobeCoordinateValueTest.php
@@ -96,7 +96,10 @@
public function testGetPrecision( GlobeCoordinateValue
$globeCoordinate, array $arguments ) {
$actual = $globeCoordinate->getPrecision();
- $this->assertTrue( is_float( $actual ) || is_int( $actual ) ||
is_null( $actual ), 'Precision is int or float or null' );
+ $this->assertTrue(
+ is_float( $actual ) || is_int( $actual ) || $actual ===
null,
+ 'Precision is int or float or null'
+ );
$this->assertEquals( $arguments[1], $actual );
}
@@ -124,7 +127,11 @@
// These serializations where generated using revision
f91f65f989cc3ffacbe924012d8f5b574e0b710c
// The strings are the result of calling getArrayValue on the
objects and then feeding this to serialize.
- $serialization =
'a:5:{s:8:"latitude";d:-4.2000000000000002;s:9:"longitude";d:42;s:8:"altitude";N;s:9:"precision";d:0.01;s:5:"globe";s:4:"mars";}';
+ $serialization = 'a:5:{s:8:"latitude";d:-4.2000000000000002;'
+ . 's:9:"longitude";d:42;'
+ . 's:8:"altitude";N;'
+ . 's:9:"precision";d:0.01;'
+ . 's:5:"globe";s:4:"mars";}';
$arrayForm = unserialize( $serialization );
$globeCoordinate = GlobeCoordinateValue::newFromArray(
$arrayForm );
@@ -134,7 +141,11 @@
$this->assertEquals( 0.01, $globeCoordinate->getPrecision() );
$this->assertEquals( 'mars', $globeCoordinate->getGlobe() );
- $serialization =
'a:5:{s:8:"latitude";d:-4.2000000000000002;s:9:"longitude";d:-42;s:8:"altitude";d:9001;s:9:"precision";d:1;s:5:"globe";s:33:"http://www.wikidata.org/entity/Q2";}';
+ $serialization = 'a:5:{s:8:"latitude";d:-4.2000000000000002;'
+ . 's:9:"longitude";d:-42;'
+ . 's:8:"altitude";d:9001;'
+ . 's:9:"precision";d:1;'
+ .
's:5:"globe";s:33:"http://www.wikidata.org/entity/Q2";}';
$arrayForm = unserialize( $serialization );
$globeCoordinate = GlobeCoordinateValue::newFromArray(
$arrayForm );
--
To view, visit https://gerrit.wikimedia.org/r/318268
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I3e6a0a2a155a241efd8599bcca182e266ca9b720
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikidata
Gerrit-Branch: master
Gerrit-Owner: WikidataBuilder <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits