Jeroen De Dauw has submitted this change and it was merged. Change subject: Move Summary class to lib, allow use in client ......................................................................
Move Summary class to lib, allow use in client Change-Id: I433bfa4214e93f9d24b0a79b7e5c2993092904f1 --- M lib/WikibaseLib.classes.php R lib/includes/Summary.php R lib/tests/phpunit/SummaryTest.php M repo/Wikibase.classes.php 4 files changed, 7 insertions(+), 11 deletions(-) Approvals: Jeroen De Dauw: Looks good to me, approved diff --git a/lib/WikibaseLib.classes.php b/lib/WikibaseLib.classes.php index 66cfa33..2947fdd 100644 --- a/lib/WikibaseLib.classes.php +++ b/lib/WikibaseLib.classes.php @@ -65,6 +65,7 @@ 'Wikibase\SiteLink' => 'includes/SiteLink.php', 'Wikibase\Lib\SnakConstructionService' => 'includes/SnakConstructionService.php', 'Wikibase\SnakFactory' => 'includes/SnakFactory.php', + 'Wikibase\Summary' => 'includes/Summary.php', 'Wikibase\Term' => 'includes/Term.php', 'Wikibase\Lib\TermsToClaimsTranslator' => 'includes/TermsToClaimsTranslator.php', 'Wikibase\Lib\TypedValueFormatter' => 'includes/TypedValueFormatter.php', diff --git a/repo/includes/Summary.php b/lib/includes/Summary.php similarity index 94% rename from repo/includes/Summary.php rename to lib/includes/Summary.php index 8a43e9d..f587fa0 100644 --- a/repo/includes/Summary.php +++ b/lib/includes/Summary.php @@ -3,15 +3,12 @@ namespace Wikibase; use Language; -use Wikibase\Repo\WikibaseRepo; +use LogicException; /** * A Summary object can be used to build complex, translatable summaries. * * @since 0.1, major refactoring in 0.4 - * - * @file - * @ingroup WikibaseRepo * * @licence GNU GPL v2+ * @author John Erling Blad @@ -68,7 +65,9 @@ * @param object[] $commentArgs the arguments to the autocomment * @param object[] $summaryArgs the arguments to the autosummary */ - public function __construct( $moduleName = null, $actionName = null, $language = null, $commentArgs = array(), $summaryArgs = array() ) { + public function __construct( $moduleName = null, $actionName = null, $language = null, + $commentArgs = array(), $summaryArgs = array() + ) { $this->moduleName = $moduleName; $this->actionName = $actionName; $this->language = $language === null ? null : (string)$language; @@ -232,10 +231,10 @@ /** * @deprecated use SummaryFormatter instead - * @throws \LogicException + * @throws LogicException */ public function toString() { - throw new \LogicException( 'toString() is no longer supported, use SummaryFormatter instead' ); + throw new LogicException( 'toString() is no longer supported, use SummaryFormatter instead' ); } } diff --git a/repo/tests/phpunit/includes/SummaryTest.php b/lib/tests/phpunit/SummaryTest.php similarity index 97% rename from repo/tests/phpunit/includes/SummaryTest.php rename to lib/tests/phpunit/SummaryTest.php index 43fc65f..c8c6058 100644 --- a/repo/tests/phpunit/includes/SummaryTest.php +++ b/lib/tests/phpunit/SummaryTest.php @@ -10,9 +10,6 @@ * * @since 0.1 * - * @ingroup WikibaseRepoTest - * @ingroup Test - * * @group Wikibase * @group WikibaseSummary * diff --git a/repo/Wikibase.classes.php b/repo/Wikibase.classes.php index 408dcb2..9a815a7 100644 --- a/repo/Wikibase.classes.php +++ b/repo/Wikibase.classes.php @@ -49,7 +49,6 @@ 'Wikibase\PropertyView' => 'includes/PropertyView.php', 'Wikibase\Repo\EntitySearchTextGenerator' => 'includes/EntitySearchTextGenerator.php', 'Wikibase\Repo\ItemSearchTextGenerator' => 'includes/ItemSearchTextGenerator.php', - 'Wikibase\Summary' => 'includes/Summary.php', 'Wikibase\SummaryFormatter' => 'includes/SummaryFormatter.php', 'Wikibase\Repo\WikibaseRepo' => 'includes/WikibaseRepo.php', 'Wikibase\ClaimHtmlGenerator' => 'includes/ClaimHtmlGenerator.php', -- To view, visit https://gerrit.wikimedia.org/r/98173 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I433bfa4214e93f9d24b0a79b7e5c2993092904f1 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Aude <aude.w...@gmail.com> Gerrit-Reviewer: Daniel Kinzler <daniel.kinz...@wikimedia.de> Gerrit-Reviewer: Jeroen De Dauw <jeroended...@gmail.com> Gerrit-Reviewer: jenkins-bot _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits