jenkins-bot has submitted this change and it was merged.
Change subject: Namespace this extension
......................................................................
Namespace this extension
Needs an OK from Wikidata team when they're ready.
Bug: T122339
Change-Id: I2a52a7f44f747cd13c34edd1ef19c96f66d548f0
---
M GeoData.php
A includes/BC.php
M includes/BoundingBox.php
M includes/Coord.php
M includes/CoordinatesOutput.php
M includes/CoordinatesParserFunction.php
M includes/GeoData.body.php
R includes/Hooks.php
R includes/Math.php
M includes/api/ApiQueryCoordinates.php
M includes/api/ApiQueryGeoSearch.php
M includes/api/ApiQueryGeoSearchDb.php
M includes/api/ApiQueryGeoSearchElastic.php
M tests/BoundingBoxTest.php
M tests/CoordTest.php
M tests/GeoDataMathTest.php
M tests/GeoSearchTest.php
M tests/MiscGeoDataTest.php
M tests/ParseCoordTest.php
19 files changed, 155 insertions(+), 57 deletions(-)
Approvals:
Aude: Looks good to me, approved
Yurik: Looks good to me, but someone else must approve
jenkins-bot: Verified
diff --git a/GeoData.php b/GeoData.php
index e708765..e0dc272 100644
--- a/GeoData.php
+++ b/GeoData.php
@@ -13,35 +13,37 @@
$dir = __DIR__;
-$wgAutoloadClasses['ApiQueryCoordinates'] =
"$dir/includes/api/ApiQueryCoordinates.php";
-$wgAutoloadClasses['ApiQueryGeoSearch'] =
"$dir/includes/api/ApiQueryGeoSearch.php";
-$wgAutoloadClasses['ApiQueryGeoSearchDb'] =
"$dir/includes/api/ApiQueryGeoSearchDb.php";
-$wgAutoloadClasses['ApiQueryGeoSearchElastic'] =
"$dir/includes/api/ApiQueryGeoSearchElastic.php";
+$wgAutoloadClasses['GeoData\ApiQueryCoordinates'] =
"$dir/includes/api/ApiQueryCoordinates.php";
+$wgAutoloadClasses['GeoData\ApiQueryGeoSearch'] =
"$dir/includes/api/ApiQueryGeoSearch.php";
+$wgAutoloadClasses['GeoData\ApiQueryGeoSearchDb'] =
"$dir/includes/api/ApiQueryGeoSearchDb.php";
+$wgAutoloadClasses['GeoData\ApiQueryGeoSearchElastic'] =
"$dir/includes/api/ApiQueryGeoSearchElastic.php";
-$wgAutoloadClasses['BoundingBox'] = "$dir/includes/BoundingBox.php";
-$wgAutoloadClasses['Coord'] = "$dir/includes/Coord.php";
-$wgAutoloadClasses['CoordinatesOutput'] =
"$dir/includes/CoordinatesOutput.php";
-$wgAutoloadClasses['CoordinatesParserFunction'] =
"$dir/includes/CoordinatesParserFunction.php";
-$wgAutoloadClasses['GeoData'] = "$dir/includes/GeoData.body.php";
-$wgAutoloadClasses['GeoDataHooks'] = "$dir/includes/GeoDataHooks.php";
-$wgAutoloadClasses['GeoDataMath'] = "$dir/includes/GeoDataMath.php";
+$wgAutoloadClasses['Coord'] = "$dir/includes/BC.php";
+$wgAutoloadClasses['CoordinatesOutput'] = "$dir/includes/BC.php";
+$wgAutoloadClasses['GeoData\BoundingBox'] = "$dir/includes/BoundingBox.php";
+$wgAutoloadClasses['GeoData\Coord'] = "$dir/includes/Coord.php";
+$wgAutoloadClasses['GeoData\CoordinatesOutput'] =
"$dir/includes/CoordinatesOutput.php";
+$wgAutoloadClasses['GeoData\CoordinatesParserFunction'] =
"$dir/includes/CoordinatesParserFunction.php";
+$wgAutoloadClasses['GeoData\GeoData'] = "$dir/includes/GeoData.body.php";
+$wgAutoloadClasses['GeoData\Hooks'] = "$dir/includes/Hooks.php";
+$wgAutoloadClasses['GeoData\Math'] = "$dir/includes/Math.php";
$wgMessagesDirs['GeoData'] = __DIR__ . '/i18n';
$wgExtensionMessagesFiles['GeoData'] = "$dir/GeoData.i18n.php";
$wgExtensionMessagesFiles['GeoDataMagic'] = "$dir/GeoData.i18n.magic.php";
-$wgAPIPropModules['coordinates'] = 'ApiQueryCoordinates';
+$wgAPIPropModules['coordinates'] = 'GeoData\ApiQueryCoordinates';
-$wgHooks['LoadExtensionSchemaUpdates'][] =
'GeoDataHooks::onLoadExtensionSchemaUpdates';
-$wgHooks['ParserFirstCallInit'][] = 'GeoDataHooks::onParserFirstCallInit';
-$wgHooks['UnitTestsList'][] = 'GeoDataHooks::onUnitTestsList';
-$wgHooks['ArticleDeleteComplete'][] = 'GeoDataHooks::onArticleDeleteComplete';
-$wgHooks['LinksUpdate'][] = 'GeoDataHooks::onLinksUpdate';
-$wgHooks['FileUpload'][] = 'GeoDataHooks::onFileUpload';
-$wgHooks['OutputPageParserOutput'][] =
'GeoDataHooks::onOutputPageParserOutput';
-$wgHooks['CirrusSearchMappingConfig'][] =
'GeoDataHooks::onCirrusSearchMappingConfig';
-$wgHooks['CirrusSearchBuildDocumentParse'][] =
'GeoDataHooks::onCirrusSearchBuildDocumentParse';
-$wgHooks['ParserTestTables'][] = 'GeoDataHooks::onParserTestTables';
+$wgHooks['LoadExtensionSchemaUpdates'][] =
'GeoData\Hooks::onLoadExtensionSchemaUpdates';
+$wgHooks['ParserFirstCallInit'][] = 'GeoData\Hooks::onParserFirstCallInit';
+$wgHooks['UnitTestsList'][] = 'GeoData\Hooks::onUnitTestsList';
+$wgHooks['ArticleDeleteComplete'][] = 'GeoData\Hooks::onArticleDeleteComplete';
+$wgHooks['LinksUpdate'][] = 'GeoData\Hooks::onLinksUpdate';
+$wgHooks['FileUpload'][] = 'GeoData\Hooks::onFileUpload';
+$wgHooks['OutputPageParserOutput'][] =
'GeoData\Hooks::onOutputPageParserOutput';
+$wgHooks['CirrusSearchMappingConfig'][] =
'GeoData\Hooks::onCirrusSearchMappingConfig';
+$wgHooks['CirrusSearchBuildDocumentParse'][] =
'GeoData\Hooks::onCirrusSearchBuildDocumentParse';
+$wgHooks['ParserTestTables'][] = 'GeoData\Hooks::onParserTestTables';
// Use the proper search backend
$wgExtensionFunctions[] = 'efInitGeoData';
@@ -49,7 +51,7 @@
function efInitGeoData() {
global $wgGeoDataBackend, $wgAPIListModules;
if ( !isset( $wgAPIListModules['geosearch'] ) ) {
- $wgAPIListModules['geosearch'] = 'ApiQueryGeoSearch' . ucfirst(
$wgGeoDataBackend );
+ $wgAPIListModules['geosearch'] = 'GeoData\ApiQueryGeoSearch' .
ucfirst( $wgGeoDataBackend );
}
}
diff --git a/includes/BC.php b/includes/BC.php
new file mode 100644
index 0000000..87f0885
--- /dev/null
+++ b/includes/BC.php
@@ -0,0 +1,10 @@
+<?php
+/**
+ * Contains classes required for backwards compatibility with old,
pre-namespaces cached
+ * parser output
+ * @todo: Remove this in summer 2016
+ */
+
+class CoordinatesOutput extends \GeoData\CoordinatesOutput {}
+
+class Coord extends \GeoData\Coord {}
diff --git a/includes/BoundingBox.php b/includes/BoundingBox.php
index 4ee7a0b..d497759 100644
--- a/includes/BoundingBox.php
+++ b/includes/BoundingBox.php
@@ -1,5 +1,7 @@
<?php
+namespace GeoData;
+
/**
* Class that represents a bounding box
* Currently, only Earth is supported
@@ -42,8 +44,8 @@
*/
public function area() {
$midLat = ( $this->lat2 + $this->lat1 ) / 2;
- $vert = GeoDataMath::distance( $this->lat1, 0, $this->lat2, 0 );
- $horz = GeoDataMath::distance( $midLat, $this->lon1, $midLat,
$this->lon2 );
+ $vert = Math::distance( $this->lat1, 0, $this->lat2, 0 );
+ $horz = Math::distance( $midLat, $this->lon1, $midLat,
$this->lon2 );
return $horz * $vert;
}
diff --git a/includes/Coord.php b/includes/Coord.php
index fc41fb3..6fc9fd8 100644
--- a/includes/Coord.php
+++ b/includes/Coord.php
@@ -1,5 +1,7 @@
<?php
+namespace GeoData;
+
/**
* Class representing coordinates
*/
@@ -80,10 +82,10 @@
if ( $radius <= 0 ) {
return new BoundingBox( $this->lat, $this->lon,
$this->lat, $this->lon, $this->globe );
}
- $r2lat = rad2deg( $radius / GeoDataMath::EARTH_RADIUS );
+ $r2lat = rad2deg( $radius / Math::EARTH_RADIUS );
// @todo: doesn't work around poles, should we care?
if ( abs( $this->lat ) < 89.9 ) {
- $r2lon = rad2deg( $radius / cos( deg2rad( $this->lat )
) / GeoDataMath::EARTH_RADIUS );
+ $r2lon = rad2deg( $radius / cos( deg2rad( $this->lat )
) / Math::EARTH_RADIUS );
} else {
$r2lon = 0.1;
}
@@ -93,8 +95,8 @@
$this->lon + $r2lon,
$this->globe
);
- GeoDataMath::wrapAround( $res->lat1, $res->lat2, -90, 90 );
- GeoDataMath::wrapAround( $res->lon1, $res->lon2, -180, 180 );
+ Math::wrapAround( $res->lat1, $res->lat2, -90, 90 );
+ Math::wrapAround( $res->lon1, $res->lon2, -180, 180 );
return $res;
}
@@ -105,7 +107,7 @@
* @return float Distance in metres
*/
public function distanceTo( Coord $coord ) {
- return GeoDataMath::distance( $this->lat, $this->lon,
$coord->lat, $coord->lon );
+ return Math::distance( $this->lat, $this->lon, $coord->lat,
$coord->lon );
}
/**
diff --git a/includes/CoordinatesOutput.php b/includes/CoordinatesOutput.php
index ffa01f0..d1a0d10 100644
--- a/includes/CoordinatesOutput.php
+++ b/includes/CoordinatesOutput.php
@@ -1,5 +1,9 @@
<?php
+namespace GeoData;
+
+use MWException;
+
/**
* Class that holds output of a parse opertion
*/
diff --git a/includes/CoordinatesParserFunction.php
b/includes/CoordinatesParserFunction.php
index dfb4d8a..aa2fa55 100644
--- a/includes/CoordinatesParserFunction.php
+++ b/includes/CoordinatesParserFunction.php
@@ -1,5 +1,14 @@
<?php
+namespace GeoData;
+
+use MagicWord;
+use MWException;
+use Parser;
+use ParserOutput;
+use PPFrame;
+use PPNode;
+use Status;
/**
* Handler for the #coordinates parser function
@@ -110,6 +119,8 @@
*/
private function applyCoord( Coord $coord ) {
global $wgMaxCoordinatesPerPage, $wgContLang;
+
+ /** @var CoordinatesOutput $geoData */
$geoData = $this->output->geoData;
if ( $wgMaxCoordinatesPerPage >= 0 && $geoData->getCount() >=
$wgMaxCoordinatesPerPage ) {
if ( $geoData->limitExceeded ) {
diff --git a/includes/GeoData.body.php b/includes/GeoData.body.php
index 5bee492..a4430dd 100644
--- a/includes/GeoData.body.php
+++ b/includes/GeoData.body.php
@@ -1,5 +1,10 @@
<?php
+namespace GeoData;
+
+use Status;
+use Title;
+
class GeoData {
/**
*
@@ -127,7 +132,7 @@
return false;
}
$alreadyFractional = $part != intval( $part );
- $value += $part * $multiplier * GeoDataMath::sign(
$value );
+ $value += $part * $multiplier * Math::sign( $value );
$multiplier /= 60;
}
if ( $coordInfo['wrap'] && $value < 0 ) {
diff --git a/includes/GeoDataHooks.php b/includes/Hooks.php
similarity index 95%
rename from includes/GeoDataHooks.php
rename to includes/Hooks.php
index fb7a79b..a876712 100644
--- a/includes/GeoDataHooks.php
+++ b/includes/Hooks.php
@@ -1,6 +1,22 @@
<?php
-class GeoDataHooks {
+namespace GeoData;
+
+use Article;
+use Content;
+use DatabaseUpdater;
+use LinksUpdate;
+use LocalFile;
+use MWException;
+use OutputPage;
+use Parser;
+use ParserOptions;
+use ParserOutput;
+use Title;
+use User;
+use WikiPage;
+
+class Hooks {
/**
* LoadExtensionSchemaUpdates hook handler
* @see
https://www.mediawiki.org/wiki/Manual:Hooks/LoadExtensionSchemaUpdates
@@ -133,9 +149,9 @@
}
$metadata = $file->getMetadata();
- MediaWiki\suppressWarnings();
+ \MediaWiki\suppressWarnings();
$metadata = unserialize( $metadata );
- MediaWiki\restoreWarnings();
+ \MediaWiki\restoreWarnings();
if ( isset( $metadata ) && isset( $metadata['GPSLatitude'] ) &&
isset( $metadata['GPSLongitude'] ) ) {
$lat = $metadata['GPSLatitude'];
@@ -304,13 +320,13 @@
/**
* CirrusSearchBuildDocumentParse hook handler
*
- * @param Elastica\Document $doc
+ * @param \Elastica\Document $doc
* @param Title $title
* @param Content $content
* @param ParserOutput $parserOutput
* @return bool
*/
- public static function onCirrusSearchBuildDocumentParse(
Elastica\Document $doc,
+ public static function onCirrusSearchBuildDocumentParse(
\Elastica\Document $doc,
Title $title,
Content $content,
ParserOutput $parserOutput )
diff --git a/includes/GeoDataMath.php b/includes/Math.php
similarity index 97%
rename from includes/GeoDataMath.php
rename to includes/Math.php
index d9282ec..7ad983f 100644
--- a/includes/GeoDataMath.php
+++ b/includes/Math.php
@@ -1,5 +1,7 @@
<?php
+namespace GeoData;
+
/**
* Class that performs basic coordinate calculations
* Note that the formulas are useful only for our specific purposes, some of
them may be
@@ -7,7 +9,7 @@
*
* All the functions that accept coordinates assume that they're in degrees,
not radians.
*/
-class GeoDataMath {
+class Math {
const EARTH_RADIUS = 6371010;
/**
diff --git a/includes/api/ApiQueryCoordinates.php
b/includes/api/ApiQueryCoordinates.php
index 07c3903..000165d 100644
--- a/includes/api/ApiQueryCoordinates.php
+++ b/includes/api/ApiQueryCoordinates.php
@@ -1,4 +1,12 @@
<?php
+
+namespace GeoData;
+
+use ApiBase;
+use ApiQueryBase;
+use MWException;
+use Title;
+
/**
* This query adds an <coordinates> subelement to all pages with the list of
coordinated present on those pages.
*/
@@ -69,7 +77,7 @@
}
if ( $from && $row->gt_globe == $from->globe ) {
$vals['dist'] = round(
- GeoDataMath::distance( $from->lat,
$from->lon, $row->gt_lat, $row->gt_lon ),
+ Math::distance( $from->lat, $from->lon,
$row->gt_lat, $row->gt_lon ),
1
);
}
diff --git a/includes/api/ApiQueryGeoSearch.php
b/includes/api/ApiQueryGeoSearch.php
index 4688526..4530a3a 100644
--- a/includes/api/ApiQueryGeoSearch.php
+++ b/includes/api/ApiQueryGeoSearch.php
@@ -1,5 +1,13 @@
<?php
+namespace GeoData;
+
+use ApiBase;
+use ApiPageSet;
+use ApiQueryGeneratorBase;
+use Title;
+use WikiPage;
+
abstract class ApiQueryGeoSearch extends ApiQueryGeneratorBase {
const MIN_RADIUS = 10;
diff --git a/includes/api/ApiQueryGeoSearchDb.php
b/includes/api/ApiQueryGeoSearchDb.php
index cccadf7..e6b88af 100644
--- a/includes/api/ApiQueryGeoSearchDb.php
+++ b/includes/api/ApiQueryGeoSearchDb.php
@@ -1,5 +1,9 @@
<?php
+namespace GeoData;
+
+use ApiPageSet;
+use Title;
class ApiQueryGeoSearchDb extends ApiQueryGeoSearch {
public function __construct( $query, $moduleName ) {
@@ -42,7 +46,7 @@
$rows = array();
foreach ( $res as $row ) {
- $row->dist = GeoDataMath::distance( $this->coord->lat,
$this->coord->lon, $row->gt_lat, $row->gt_lon );
+ $row->dist = Math::distance( $this->coord->lat,
$this->coord->lon, $row->gt_lat, $row->gt_lon );
$rows[] = $row;
}
// sort in PHP because sorting via SQL would involve a filesort
diff --git a/includes/api/ApiQueryGeoSearchElastic.php
b/includes/api/ApiQueryGeoSearchElastic.php
index 00312e5..c2cb042 100644
--- a/includes/api/ApiQueryGeoSearchElastic.php
+++ b/includes/api/ApiQueryGeoSearchElastic.php
@@ -1,5 +1,13 @@
<?php
+namespace GeoData;
+
+use ApiPageSet;
+use ConfigFactory;
+use MWException;
+use MWNamespace;
+use Title;
+
class ApiQueryGeoSearchElastic extends ApiQueryGeoSearch {
private $params;
@@ -19,16 +27,16 @@
try {
$params = $this->params = $this->extractRequestParams();
- $bools = new Elastica\Filter\Bool();
+ $bools = new \Elastica\Filter\Bool();
if ( $this->idToExclude ) {
$bools->addMustNot(
- new Elastica\Filter\Term( array( '_id'
=> $this->idToExclude ) )
+ new \Elastica\Filter\Term( array( '_id'
=> $this->idToExclude ) )
);
}
// Only Earth is supported
- $bools->addMust( new Elastica\Filter\Term( array(
'coordinates.globe' => 'earth' ) ) );
+ $bools->addMust( new \Elastica\Filter\Term( array(
'coordinates.globe' => 'earth' ) ) );
if ( isset( $params['maxdim'] ) ) {
- $bools->addMust( new Elastica\Filter\Range(
+ $bools->addMust( new \Elastica\Filter\Range(
'coordinates.dim',
array( 'to' => $params['maxdim'] ) )
);
@@ -36,12 +44,12 @@
$primary = $params['primary'];
if ( $primary !== 'all' ) {
- $bools->addMust( new Elastica\Filter\Term(
+ $bools->addMust( new \Elastica\Filter\Term(
array( 'coordinates.primary' => intval(
$primary === 'primary' ) )
) );
}
if ( $this->bbox ) {
- $distanceFilter = new
Elastica\Filter\GeoBoundingBox( 'coordinates.coord',
+ $distanceFilter = new
\Elastica\Filter\GeoBoundingBox( 'coordinates.coord',
array(
array( 'lat' =>
$this->bbox->lat1, 'lon' => $this->bbox->lon1 ),
array( 'lat' =>
$this->bbox->lat2, 'lon' => $this->bbox->lon2 ),
@@ -49,7 +57,7 @@
);
} else {
$distanceFilter =
- new Elastica\Filter\GeoDistance(
'coordinates.coord',
+ new \Elastica\Filter\GeoDistance(
'coordinates.coord',
array( 'lat' =>
$this->coord->lat, 'lon' => $this->coord->lon ),
$this->radius . 'm'
);
@@ -58,23 +66,23 @@
}
}
- $query = new Elastica\Query();
+ $query = new \Elastica\Query();
$fields = array_map(
function( $prop ) { return "coordinates.$prop";
},
array_merge( array( 'coord', 'primary' ),
$params['prop'] )
);
$query->setParam( '_source', $fields );
- $filter = new Elastica\Filter\BoolAnd();
+ $filter = new \Elastica\Filter\BoolAnd();
$filter->addFilter( $bools );
$filter->addFilter( $distanceFilter );
- $nested = new Elastica\Filter\Nested();
+ $nested = new \Elastica\Filter\Nested();
$nested->setPath( 'coordinates' )
->setFilter( $filter );
if ( count( $params['namespace'] ) < count(
MWNamespace::getValidNamespaces() ) ) {
- $outerFilter = new Elastica\Filter\Bool();
+ $outerFilter = new \Elastica\Filter\Bool();
$outerFilter->addMust( $nested );
$outerFilter->addMust(
- new Elastica\Filter\Terms( 'namespace',
$params['namespace'] )
+ new \Elastica\Filter\Terms(
'namespace', $params['namespace'] )
);
$query->setPostFilter( $outerFilter );
} else {
@@ -92,8 +100,8 @@
);
$query->setSize( $params['limit'] );
- $config =
\ConfigFactory::getDefaultInstance()->makeConfig( 'CirrusSearch' );
- $connection = new CirrusSearch\Connection( $config );
+ $config =
ConfigFactory::getDefaultInstance()->makeConfig( 'CirrusSearch' );
+ $connection = new \CirrusSearch\Connection( $config );
$pageType = $connection->getPageType( wfWikiID() );
$search = $pageType->createSearch( $query );
@@ -191,7 +199,7 @@
} else {
$resultPageSet->populateFromQueryResult(
$this->getDB(), $res );
}
- } catch ( Elastica\Exception\ExceptionInterface $e ) {
+ } catch ( \Elastica\Exception\ExceptionInterface $e ) {
throw new MWException( get_class( $e )
. " at {$e->getFile()}, line {$e->getLine()}:
{$e->getMessage()}", 0, $e
);
diff --git a/tests/BoundingBoxTest.php b/tests/BoundingBoxTest.php
index 87f4afb..af3b014 100644
--- a/tests/BoundingBoxTest.php
+++ b/tests/BoundingBoxTest.php
@@ -1,5 +1,7 @@
<?php
+use GeoData\BoundingBox;
+
/**
* @group GeoData
*/
diff --git a/tests/CoordTest.php b/tests/CoordTest.php
index 8df8898..423bcfa 100644
--- a/tests/CoordTest.php
+++ b/tests/CoordTest.php
@@ -1,4 +1,8 @@
<?php
+
+use GeoData\Coord;
+use GeoData\Math;
+
/**
* @todo: More tests
* @group GeoData
@@ -35,8 +39,8 @@
for ( $i = 0; $i < 90; $i += 5 ) {
$coord = new Coord( $i, $i );
$bbox = $coord->bboxAround( 5000 );
- $this->assertEquals( 10000, GeoDataMath::distance(
$bbox->lat1, $i, $bbox->lat2, $i ), 'Testing latitude', 1 );
- $this->assertEquals( 10000, GeoDataMath::distance( $i,
$bbox->lon1, $i, $bbox->lon2 ), 'Testing longitude', 1 );
+ $this->assertEquals( 10000, Math::distance(
$bbox->lat1, $i, $bbox->lat2, $i ), 'Testing latitude', 1 );
+ $this->assertEquals( 10000, Math::distance( $i,
$bbox->lon1, $i, $bbox->lon2 ), 'Testing longitude', 1 );
}
}
}
\ No newline at end of file
diff --git a/tests/GeoDataMathTest.php b/tests/GeoDataMathTest.php
index 7268e47..ed5e0b5 100644
--- a/tests/GeoDataMathTest.php
+++ b/tests/GeoDataMathTest.php
@@ -1,5 +1,8 @@
<?php
+use GeoData\Coord;
+use GeoData\Math;
+
/**
* @group GeoData
*/
@@ -8,7 +11,7 @@
* @dataProvider getDistanceData
*/
public function testDistance( $lat1, $lon1, $lat2, $lon2, $dist, $name
) {
- $this->assertEquals( $dist, GeoDataMath::distance( $lat1,
$lon1, $lat2, $lon2 ), "testDistance(): $name", $dist / 1000 );
+ $this->assertEquals( $dist, Math::distance( $lat1, $lon1,
$lat2, $lon2 ), "testDistance(): $name", $dist / 1000 );
}
public function getDistanceData() {
diff --git a/tests/GeoSearchTest.php b/tests/GeoSearchTest.php
index 2761ba8..93c3ade 100644
--- a/tests/GeoSearchTest.php
+++ b/tests/GeoSearchTest.php
@@ -1,5 +1,7 @@
<?php
+use GeoData\ApiQueryGeoSearch;
+
/**
* @group GeoData
*/
diff --git a/tests/MiscGeoDataTest.php b/tests/MiscGeoDataTest.php
index ee3b973..676bcec 100644
--- a/tests/MiscGeoDataTest.php
+++ b/tests/MiscGeoDataTest.php
@@ -1,5 +1,7 @@
<?php
+use GeoData\ApiQueryGeoSearchDb;
+
/**
* @group GeoData
*/
diff --git a/tests/ParseCoordTest.php b/tests/ParseCoordTest.php
index 0d2fb02..89ff50c 100644
--- a/tests/ParseCoordTest.php
+++ b/tests/ParseCoordTest.php
@@ -1,5 +1,8 @@
<?php
+use GeoData\Coord;
+use GeoData\GeoData;
+
/**
* @group GeoData
*/
--
To view, visit https://gerrit.wikimedia.org/r/262741
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I2a52a7f44f747cd13c34edd1ef19c96f66d548f0
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/GeoData
Gerrit-Branch: master
Gerrit-Owner: MaxSem <[email protected]>
Gerrit-Reviewer: Aude <[email protected]>
Gerrit-Reviewer: Hoo man <[email protected]>
Gerrit-Reviewer: Yurik <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits