Thiemo Mättig (WMDE) has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/256676

Change subject: Remove unused imports
......................................................................

Remove unused imports

Note that some of these are actually broken. Some of these class names
do not exist any more or got renamed. This is not an actual issue
because both PHP and HHVM ignore these lines when the class is not
actually used in the code below. But it's confusing when reading the
code and triggers warnings in IDEs and other tools. Why claim that some
code does use a class, if it doesn't?

I'm using a regex to find these, since I found this is much more reliable
than certain tool. For example, a tool must know all dependencies,
otherwise it can not work reliably. My regex does not care about this.

The regex also considers comments, something some tools do not do.

(?s)\nuse\s+(?:\b\w+\\)*(\b\w+\b)\s*;(?!.*\b\1\b)

Change-Id: Ibd77b57210c4658bd216798d2e89ba6c1accf307
---
M container.php
M includes/Api/ApiFlowBase.php
M includes/Api/ApiFlowBasePost.php
M includes/Api/ApiQueryPropFlowInfo.php
M includes/Block/Block.php
M includes/Block/BoardHistory.php
M includes/Content/BoardContent.php
M includes/Conversion/Utils.php
M includes/Data/Index/BoardHistoryIndex.php
M includes/Data/Index/PostRevisionTopicHistoryIndex.php
M includes/Data/Index/TopKIndex.php
M includes/Data/Listener/AbstractListener.php
M includes/Data/Listener/ModerationLoggingListener.php
M includes/Data/Listener/RecentChangesListener.php
M includes/Data/ObjectLocator.php
M includes/Data/Storage/BoardHistoryStorage.php
M includes/Data/Storage/PostRevisionStorage.php
M includes/Formatter/BaseTopicListFormatter.php
M includes/Formatter/BoardHistoryQuery.php
M includes/Formatter/CategoryViewerFormatter.php
M includes/Formatter/ChangesListFormatter.php
M includes/Formatter/FeedItemFormatter.php
M includes/Formatter/IRCLineUrlFormatter.php
M includes/Formatter/RevisionFormatter.php
M includes/Formatter/RevisionUndoViewFormatter.php
M includes/Formatter/TopicHistoryQuery.php
M includes/Import/Converter.php
M includes/Import/Importer.php
M includes/Import/LiquidThreadsApi/ConversionStrategy.php
M includes/Import/LiquidThreadsApi/Objects.php
M includes/Import/LiquidThreadsApi/Source.php
M includes/Import/OptInController.php
M includes/Import/Postprocessor/LqtRedirector.php
M includes/Import/Wikitext/ConversionStrategy.php
M includes/Import/Wikitext/ImportSource.php
M includes/Model/Workflow.php
M includes/Parsoid/ContentFixer.php
M includes/Parsoid/Extractor/CategoryExtractor.php
M includes/Parsoid/Fixer.php
M includes/Parsoid/Fixer/BadImageRemover.php
M includes/Parsoid/Fixer/WikiLinkFixer.php
M includes/Repository/MultiGetList.php
M includes/Repository/TreeRepository.php
M includes/RevisionActionPermissions.php
M includes/Search/Iterators/AbstractIterator.php
M includes/Search/Iterators/TopicIterator.php
M includes/Search/Searcher.php
M includes/SpamFilter/AbuseFilter.php
M includes/Templating.php
M includes/View.php
M maintenance/convertLqtPageFromRemoteApiForTesting.php
M maintenance/convertLqtPageOnLocalWiki.php
M maintenance/convertNamespaceFromWikitext.php
M tests/phpunit/BlockFactoryTest.php
M tests/phpunit/Data/Pager/PagerTest.php
M tests/phpunit/FlowTestCase.php
M tests/phpunit/Handlebars/FlowPostMetaActionsTest.php
M tests/phpunit/Mock/MockImportPost.php
M tests/phpunit/Mock/MockImportSummary.php
M tests/phpunit/Parsoid/Fixer/BadImageRemoverTest.php
M tests/phpunit/Parsoid/Fixer/WikiLinkFixerTest.php
M tests/phpunit/PermissionsTest.php
M tests/phpunit/PostRevisionTestCase.php
M tests/phpunit/api/ApiFlowEditHeaderTest.php
M tests/phpunit/api/ApiFlowEditPostTest.php
M tests/phpunit/api/ApiFlowEditTitleTest.php
M tests/phpunit/api/ApiFlowEditTopicSummaryTest.php
M tests/phpunit/api/ApiFlowLockTopicTest.php
M tests/phpunit/api/ApiFlowModeratePostTest.php
M tests/phpunit/api/ApiFlowModerateTopicTest.php
M tests/phpunit/api/ApiFlowReplyTest.php
M tests/phpunit/api/ApiFlowViewHeaderTest.php
M tests/phpunit/api/ApiTestCase.php
73 files changed, 1 insertion(+), 139 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Flow 
refs/changes/76/256676/1

diff --git a/container.php b/container.php
index e460512..ed7be41 100644
--- a/container.php
+++ b/container.php
@@ -131,21 +131,15 @@
 use Flow\Data\Storage\HeaderRevisionStorage;
 use Flow\Data\Storage\PostSummaryRevisionBoardHistoryStorage;
 use Flow\Data\Storage\PostSummaryRevisionStorage;
-use Flow\Data\Storage\TopicHistoryStorage;
 use Flow\Data\Index\UniqueFeatureIndex;
 use Flow\Data\Index\TopKIndex;
 use Flow\Data\Index\TopicListTopKIndex;
-use Flow\Data\Storage\BoardHistoryStorage;
 use Flow\Data\Storage\PostRevisionTopicHistoryStorage;
-use Flow\Data\Index\BoardHistoryIndex;
 use Flow\Data\Index\PostRevisionBoardHistoryIndex;
 use Flow\Data\Index\PostRevisionTopicHistoryIndex;
 use Flow\Data\Index\PostSummaryRevisionBoardHistoryIndex;
 use Flow\Data\ObjectManager;
 use Flow\Data\ObjectLocator;
-use Flow\Model\Header;
-use Flow\Model\PostRevision;
-use Flow\Model\PostSummary;
 
 // This currently never clears $this->bag, which makes it unusuable for 
long-running batch.
 // Use 'memcache.non_local_buffered' for those instead.
diff --git a/includes/Api/ApiFlowBase.php b/includes/Api/ApiFlowBase.php
index 61435d7..09e22b0 100644
--- a/includes/Api/ApiFlowBase.php
+++ b/includes/Api/ApiFlowBase.php
@@ -6,7 +6,6 @@
 use Flow\Block\Block;
 use Flow\Container;
 use Flow\Model\AbstractRevision;
-use Flow\TalkpageManager;
 use Flow\WorkflowLoader;
 use Flow\WorkflowLoaderFactory;
 use Title;
diff --git a/includes/Api/ApiFlowBasePost.php b/includes/Api/ApiFlowBasePost.php
index 1c796ad..1b8dc7d 100644
--- a/includes/Api/ApiFlowBasePost.php
+++ b/includes/Api/ApiFlowBasePost.php
@@ -2,7 +2,6 @@
 
 namespace Flow\Api;
 
-use ApiBase;
 use Flow\Model\Anchor;
 use Flow\Model\UUID;
 use Message;
diff --git a/includes/Api/ApiQueryPropFlowInfo.php 
b/includes/Api/ApiQueryPropFlowInfo.php
index bff43ea..e2130ad 100644
--- a/includes/Api/ApiQueryPropFlowInfo.php
+++ b/includes/Api/ApiQueryPropFlowInfo.php
@@ -3,7 +3,6 @@
 namespace Flow\Api;
 
 use ApiQueryBase;
-use Flow\Container;
 use Title;
 
 class ApiQueryPropFlowInfo extends ApiQueryBase {
diff --git a/includes/Block/Block.php b/includes/Block/Block.php
index 121b084..85e7378 100644
--- a/includes/Block/Block.php
+++ b/includes/Block/Block.php
@@ -5,7 +5,6 @@
 use Flow\Container;
 use Flow\Data\ManagerGroup;
 use Flow\Exception\InvalidInputException;
-use Flow\Exception\PermissionException;
 use Flow\FlowActions;
 use Flow\Model\AbstractRevision;
 use Flow\Model\UUID;
diff --git a/includes/Block/BoardHistory.php b/includes/Block/BoardHistory.php
index d69094f..3ab02b6 100644
--- a/includes/Block/BoardHistory.php
+++ b/includes/Block/BoardHistory.php
@@ -7,7 +7,6 @@
 use Flow\Exception\DataModelException;
 use Flow\Formatter\BoardHistoryQuery;
 use Flow\Formatter\RevisionFormatter;
-use Flow\Model\UUID;
 
 class BoardHistoryBlock extends AbstractBlock {
        protected $supportedGetActions = array( 'history' );
diff --git a/includes/Content/BoardContent.php 
b/includes/Content/BoardContent.php
index 0be2c29..18a7626 100644
--- a/includes/Content/BoardContent.php
+++ b/includes/Content/BoardContent.php
@@ -9,7 +9,6 @@
 use Flow\Exception\UnknownWorkflowIdException;
 use Flow\LinksTableUpdater;
 use Flow\Model\UUID;
-use Flow\RevisionActionPermissions;
 use Flow\View;
 use Flow\WorkflowLoaderFactory;
 use OutputPage;
diff --git a/includes/Conversion/Utils.php b/includes/Conversion/Utils.php
index 9a75cc3..9e9fb85 100644
--- a/includes/Conversion/Utils.php
+++ b/includes/Conversion/Utils.php
@@ -7,7 +7,6 @@
 use FauxResponse;
 use Flow\Container;
 use Flow\Exception\FlowException;
-use Flow\Exception\InvalidDataException;
 use Flow\Exception\NoParserException;
 use Flow\Exception\WikitextException;
 use Language;
diff --git a/includes/Data/Index/BoardHistoryIndex.php 
b/includes/Data/Index/BoardHistoryIndex.php
index 4b18eff..9c1fc54 100644
--- a/includes/Data/Index/BoardHistoryIndex.php
+++ b/includes/Data/Index/BoardHistoryIndex.php
@@ -7,9 +7,7 @@
 use Flow\Data\ObjectMapper;
 use Flow\Data\Storage\BoardHistoryStorage;
 use Flow\Exception\DataModelException;
-use Flow\Exception\InvalidInputException;
 use Flow\Model\AbstractRevision;
-use Flow\Model\Header;
 use Flow\Model\PostSummary;
 use Flow\Model\PostRevision;
 use Flow\Model\TopicListEntry;
diff --git a/includes/Data/Index/PostRevisionTopicHistoryIndex.php 
b/includes/Data/Index/PostRevisionTopicHistoryIndex.php
index 301777b..2b12207 100644
--- a/includes/Data/Index/PostRevisionTopicHistoryIndex.php
+++ b/includes/Data/Index/PostRevisionTopicHistoryIndex.php
@@ -5,10 +5,8 @@
 use Flow\Data\BufferedCache;
 use Flow\Data\ObjectMapper;
 use Flow\Data\Storage\PostRevisionTopicHistoryStorage;
-use Flow\Exception\InvalidInputException;
 use Flow\Model\PostRevision;
 use Flow\Model\PostSummary;
-use Flow\Model\Workflow;
 use Flow\Model\UUID;
 use MWException;
 
@@ -67,7 +65,7 @@
         * Finds topic ID for given Post
         *
         * @param PostRevision $post
-        * return UUID Topic ID
+        * @return UUID Topic ID
         */
        protected function findTopicId( PostRevision $post ) {
                return $post->getRootPost()->getPostId();
diff --git a/includes/Data/Index/TopKIndex.php 
b/includes/Data/Index/TopKIndex.php
index d3ad7a1..3aed22d 100644
--- a/includes/Data/Index/TopKIndex.php
+++ b/includes/Data/Index/TopKIndex.php
@@ -10,7 +10,6 @@
 use Flow\Data\Compactor\ShallowCompactor;
 use Flow\Data\Utils\SortArrayByKeys;
 use Flow\Exception\InvalidInputException;
-use Flow\Model\UUID;
 
 /**
  * Holds the top k items with matching $indexed columns.  List is sorted and 
truncated to specified size.
diff --git a/includes/Data/Listener/AbstractListener.php 
b/includes/Data/Listener/AbstractListener.php
index 079f70a..bc3586f 100644
--- a/includes/Data/Listener/AbstractListener.php
+++ b/includes/Data/Listener/AbstractListener.php
@@ -2,15 +2,7 @@
 
 namespace Flow\Data\Listener;
 
-use Closure;
-use Flow\Container;
 use Flow\Data\LifecycleHandler;
-use Flow\Data\Utils\RecentChangeFactory;
-use Flow\FlowActions;
-use Flow\Formatter\IRCLineUrlFormatter;
-use Flow\Model\AbstractRevision;
-use Flow\Model\Workflow;
-use Flow\Repository\UserNameBatch;
 
 /**
  * Inserts mw recentchange rows for flow AbstractRevision instances.
diff --git a/includes/Data/Listener/ModerationLoggingListener.php 
b/includes/Data/Listener/ModerationLoggingListener.php
index 6e52f0c..4ec1345 100644
--- a/includes/Data/Listener/ModerationLoggingListener.php
+++ b/includes/Data/Listener/ModerationLoggingListener.php
@@ -3,7 +3,6 @@
 namespace Flow\Data\Listener;
 
 use Flow\Log\ModerationLogger;
-use Flow\Model\AbstractRevision;
 use Flow\Model\PostRevision;
 use Flow\Model\Workflow;
 
diff --git a/includes/Data/Listener/RecentChangesListener.php 
b/includes/Data/Listener/RecentChangesListener.php
index b3a1b18..cf61ca1 100644
--- a/includes/Data/Listener/RecentChangesListener.php
+++ b/includes/Data/Listener/RecentChangesListener.php
@@ -3,7 +3,6 @@
 namespace Flow\Data\Listener;
 
 use Closure;
-use Flow\Container;
 use Flow\Data\Utils\RecentChangeFactory;
 use Flow\FlowActions;
 use Flow\Formatter\IRCLineUrlFormatter;
diff --git a/includes/Data/ObjectLocator.php b/includes/Data/ObjectLocator.php
index d4fa69a..6dd6a40 100644
--- a/includes/Data/ObjectLocator.php
+++ b/includes/Data/ObjectLocator.php
@@ -4,7 +4,6 @@
 
 use Flow\DbFactory;
 use Flow\Data\Utils\RawSql;
-use Flow\Exception\FlowException;
 use Flow\Exception\NoIndexException;
 use Flow\Model\UUID;
 use FormatJson;
diff --git a/includes/Data/Storage/BoardHistoryStorage.php 
b/includes/Data/Storage/BoardHistoryStorage.php
index 7685533..8334f91 100644
--- a/includes/Data/Storage/BoardHistoryStorage.php
+++ b/includes/Data/Storage/BoardHistoryStorage.php
@@ -2,7 +2,6 @@
 
 namespace Flow\Data\Storage;
 
-use Flow\Model\UUID;
 use Flow\Exception\DataModelException;
 
 /**
diff --git a/includes/Data/Storage/PostRevisionStorage.php 
b/includes/Data/Storage/PostRevisionStorage.php
index c49dfa5..4ecca09 100644
--- a/includes/Data/Storage/PostRevisionStorage.php
+++ b/includes/Data/Storage/PostRevisionStorage.php
@@ -5,7 +5,6 @@
 use Flow\DbFactory;
 use Flow\Model\UUID;
 use Flow\Repository\TreeRepository;
-use Flow\Exception\DataModelException;
 
 /**
  * SQL storage and query for PostRevision instances
diff --git a/includes/Formatter/BaseTopicListFormatter.php 
b/includes/Formatter/BaseTopicListFormatter.php
index 0247ffd..55ad4b7 100644
--- a/includes/Formatter/BaseTopicListFormatter.php
+++ b/includes/Formatter/BaseTopicListFormatter.php
@@ -2,7 +2,6 @@
 
 namespace Flow\Formatter;
 
-use Flow\Data\Pager\PagerPage;
 use Flow\Model\Anchor;
 use Flow\Model\Workflow;
 
diff --git a/includes/Formatter/BoardHistoryQuery.php 
b/includes/Formatter/BoardHistoryQuery.php
index 4c5ce31..a18175e 100644
--- a/includes/Formatter/BoardHistoryQuery.php
+++ b/includes/Formatter/BoardHistoryQuery.php
@@ -2,13 +2,10 @@
 
 namespace Flow\Formatter;
 
-use Flow\Data\Storage\RevisionStorage;
 use Flow\Data\Utils\SortRevisionsByRevisionId;
 use Flow\Exception\FlowException;
 use Flow\Model\UUID;
 use MWExceptionHandler;
-use Flow\Model\AbstractRevision;
-use Flow\FlowActions;
 
 class BoardHistoryQuery extends HistoryQuery {
        /**
diff --git a/includes/Formatter/CategoryViewerFormatter.php 
b/includes/Formatter/CategoryViewerFormatter.php
index dfaf880..a250376 100644
--- a/includes/Formatter/CategoryViewerFormatter.php
+++ b/includes/Formatter/CategoryViewerFormatter.php
@@ -3,7 +3,6 @@
 namespace Flow\Formatter;
 
 use Flow\RevisionActionPermissions;
-use Flow\Model\UUID;
 use Linker;
 
 /**
diff --git a/includes/Formatter/ChangesListFormatter.php 
b/includes/Formatter/ChangesListFormatter.php
index 0515d81..a507602 100644
--- a/includes/Formatter/ChangesListFormatter.php
+++ b/includes/Formatter/ChangesListFormatter.php
@@ -6,7 +6,6 @@
 use Flow\Exception\PermissionException;
 use Flow\Model\Anchor;
 use ChangesList;
-use Flow\Model\PostRevision;
 use Flow\Model\UUID;
 use Flow\Conversion\Utils;
 use IContextSource;
diff --git a/includes/Formatter/FeedItemFormatter.php 
b/includes/Formatter/FeedItemFormatter.php
index f182d35..defc5f5 100644
--- a/includes/Formatter/FeedItemFormatter.php
+++ b/includes/Formatter/FeedItemFormatter.php
@@ -2,10 +2,8 @@
 
 namespace Flow\Formatter;
 
-use Exception;
 use FeedItem;
 use Flow\Exception\FlowException;
-use Flow\Model\PostRevision;
 use IContextSource;
 
 class FeedItemFormatter extends AbstractFormatter {
diff --git a/includes/Formatter/IRCLineUrlFormatter.php 
b/includes/Formatter/IRCLineUrlFormatter.php
index 8cbce8b..987ea94 100644
--- a/includes/Formatter/IRCLineUrlFormatter.php
+++ b/includes/Formatter/IRCLineUrlFormatter.php
@@ -3,7 +3,6 @@
 namespace Flow\Formatter;
 
 use Flow\Container;
-use Flow\Exception\FlowException;
 use Flow\RevisionActionPermissions;
 use IContextSource;
 use RCFeedFormatter;
diff --git a/includes/Formatter/RevisionFormatter.php 
b/includes/Formatter/RevisionFormatter.php
index 4f57801..1029e29 100644
--- a/includes/Formatter/RevisionFormatter.php
+++ b/includes/Formatter/RevisionFormatter.php
@@ -3,7 +3,6 @@
 namespace Flow\Formatter;
 
 use Flow\Collection\PostCollection;
-use Flow\Container;
 use Flow\Exception\PermissionException;
 use Flow\Repository\UserNameBatch;
 use Flow\Exception\FlowException;
diff --git a/includes/Formatter/RevisionUndoViewFormatter.php 
b/includes/Formatter/RevisionUndoViewFormatter.php
index f986217..e62dab4 100644
--- a/includes/Formatter/RevisionUndoViewFormatter.php
+++ b/includes/Formatter/RevisionUndoViewFormatter.php
@@ -3,7 +3,6 @@
 namespace Flow\Formatter;
 
 use DifferenceEngine;
-use Flow\Model\AbstractRevision;
 use IContextSource;
 use TextContent;
 
diff --git a/includes/Formatter/TopicHistoryQuery.php 
b/includes/Formatter/TopicHistoryQuery.php
index 9c9a6fa..67e214f 100644
--- a/includes/Formatter/TopicHistoryQuery.php
+++ b/includes/Formatter/TopicHistoryQuery.php
@@ -4,10 +4,8 @@
 
 use Flow\Data\Utils\SortRevisionsByRevisionId;
 use Flow\Exception\FlowException;
-use Flow\Model\AbstractRevision;
 use Flow\Model\PostRevision;
 use Flow\Model\UUID;
-use Flow\FlowActions;
 
 class TopicHistoryQuery extends HistoryQuery {
        /**
diff --git a/includes/Import/Converter.php b/includes/Import/Converter.php
index 44c8e84..e0f7da1 100644
--- a/includes/Import/Converter.php
+++ b/includes/Import/Converter.php
@@ -3,7 +3,6 @@
 namespace Flow\Import;
 
 use DatabaseBase;
-use Flow\Repository\TitleRepository;
 use Flow\Exception\FlowException;
 use MovePage;
 use MWExceptionHandler;
diff --git a/includes/Import/Importer.php b/includes/Import/Importer.php
index ddadce1..dcda1c7 100644
--- a/includes/Import/Importer.php
+++ b/includes/Import/Importer.php
@@ -18,7 +18,6 @@
 use Flow\Model\Workflow;
 use Flow\OccupationController;
 use Flow\WorkflowLoaderFactory;
-use Flow\Container;
 use IP;
 use MWCryptRand;
 use MWTimestamp;
diff --git a/includes/Import/LiquidThreadsApi/ConversionStrategy.php 
b/includes/Import/LiquidThreadsApi/ConversionStrategy.php
index d15cb4e..7795ceb 100644
--- a/includes/Import/LiquidThreadsApi/ConversionStrategy.php
+++ b/includes/Import/LiquidThreadsApi/ConversionStrategy.php
@@ -4,7 +4,6 @@
 
 use DatabaseBase;
 use Flow\Import\ArchiveNameHelper;
-use Flow\Import\Converter;
 use Flow\Import\IConversionStrategy;
 use Flow\Import\ImportSourceStore;
 use Flow\Import\Postprocessor\ProcessorGroup;
diff --git a/includes/Import/LiquidThreadsApi/Objects.php 
b/includes/Import/LiquidThreadsApi/Objects.php
index ff0940f..0eca7fc 100644
--- a/includes/Import/LiquidThreadsApi/Objects.php
+++ b/includes/Import/LiquidThreadsApi/Objects.php
@@ -2,7 +2,6 @@
 
 namespace Flow\Import\LiquidThreadsApi;
 
-use ApiResult;
 use AppendIterator;
 use ArrayIterator;
 use Flow\Import\IImportHeader;
diff --git a/includes/Import/LiquidThreadsApi/Source.php 
b/includes/Import/LiquidThreadsApi/Source.php
index 53e7b40..53d2d5a 100644
--- a/includes/Import/LiquidThreadsApi/Source.php
+++ b/includes/Import/LiquidThreadsApi/Source.php
@@ -8,7 +8,6 @@
 use FauxRequest;
 use Flow\Import\ImportException;
 use Flow\Import\IImportSource;
-use Flow\Import\ApiNullResponseException;
 use Http;
 use RequestContext;
 use Psr\Log\LoggerAwareInterface;
diff --git a/includes/Import/OptInController.php 
b/includes/Import/OptInController.php
index fd6fe1c..60aae45 100644
--- a/includes/Import/OptInController.php
+++ b/includes/Import/OptInController.php
@@ -11,7 +11,6 @@
 use Flow\NotificationController;
 use Flow\OccupationController;
 use Flow\Conversion\Utils;
-use Flow\RevisionActionPermissions;
 use Flow\WorkflowLoader;
 use Flow\WorkflowLoaderFactory;
 use IContextSource;
diff --git a/includes/Import/Postprocessor/LqtRedirector.php 
b/includes/Import/Postprocessor/LqtRedirector.php
index 1517b9e..7bca90c 100644
--- a/includes/Import/Postprocessor/LqtRedirector.php
+++ b/includes/Import/Postprocessor/LqtRedirector.php
@@ -8,7 +8,6 @@
 use Flow\Import\LiquidThreadsApi\ImportPost;
 use Flow\Import\LiquidThreadsApi\ImportTopic;
 use Flow\Import\PageImportState;
-use Flow\Import\PostImportState;
 use Flow\Import\TopicImportState;
 use Flow\Model\UUID;
 use Flow\UrlGenerator;
@@ -16,7 +15,6 @@
 use User;
 use WatchedItem;
 use WikiPage;
-use WikitextContent;
 
 class LqtRedirector implements Postprocessor {
        /** @var UrlGenerator **/
diff --git a/includes/Import/Wikitext/ConversionStrategy.php 
b/includes/Import/Wikitext/ConversionStrategy.php
index 6fd8c30..cf7a17c 100644
--- a/includes/Import/Wikitext/ConversionStrategy.php
+++ b/includes/Import/Wikitext/ConversionStrategy.php
@@ -5,7 +5,6 @@
 use DateTime;
 use DateTimeZone;
 use Flow\Import\ArchiveNameHelper;
-use Flow\Import\Converter;
 use Flow\Import\IConversionStrategy;
 use Flow\Import\ImportSourceStore;
 use LinkBatch;
diff --git a/includes/Import/Wikitext/ImportSource.php 
b/includes/Import/Wikitext/ImportSource.php
index f1b576a..5f23199 100644
--- a/includes/Import/Wikitext/ImportSource.php
+++ b/includes/Import/Wikitext/ImportSource.php
@@ -4,7 +4,6 @@
 
 use ArrayIterator;
 use Flow\Import\TemplateHelper;
-use Flow\Conversion\Utils;
 use FlowHooks;
 use Flow\Import\ImportException;
 use Flow\Import\Plain\ImportHeader;
diff --git a/includes/Model/Workflow.php b/includes/Model/Workflow.php
index c954071..c4cee2b 100644
--- a/includes/Model/Workflow.php
+++ b/includes/Model/Workflow.php
@@ -2,14 +2,10 @@
 
 namespace Flow\Model;
 
-use Article;
-use Flow\Container;
 use Flow\Exception\CrossWikiException;
 use Flow\Exception\DataModelException;
 use Flow\Exception\FailCommitException;
 use Flow\Exception\InvalidInputException;
-use Flow\Exception\PermissionException;
-use Flow\OccupationController;
 use MapCacheLRU;
 use MWTimestamp;
 use Title;
diff --git a/includes/Parsoid/ContentFixer.php 
b/includes/Parsoid/ContentFixer.php
index 6d5325e..6d0d29e 100644
--- a/includes/Parsoid/ContentFixer.php
+++ b/includes/Parsoid/ContentFixer.php
@@ -7,7 +7,6 @@
 use Flow\Conversion\Utils;
 use Flow\Exception\FlowException;
 use Flow\Model\AbstractRevision;
-use Flow\Model\PostRevision;
 use Title;
 
 class ContentFixer {
diff --git a/includes/Parsoid/Extractor/CategoryExtractor.php 
b/includes/Parsoid/Extractor/CategoryExtractor.php
index 8b0a0d3..2e706ef 100644
--- a/includes/Parsoid/Extractor/CategoryExtractor.php
+++ b/includes/Parsoid/Extractor/CategoryExtractor.php
@@ -6,7 +6,6 @@
 use Flow\Model\WikiReference;
 use Flow\Parsoid\ReferenceFactory;
 use Flow\Parsoid\Extractor;
-use Title;
 
 /**
  * Runs against page content via Flow\Parsoid\ReferenceExtractor
diff --git a/includes/Parsoid/Fixer.php b/includes/Parsoid/Fixer.php
index 93b894c..7923ecc 100644
--- a/includes/Parsoid/Fixer.php
+++ b/includes/Parsoid/Fixer.php
@@ -3,7 +3,6 @@
 namespace Flow\Parsoid;
 
 use DOMNode;
-use Flow\Model\PostRevision;
 use Title;
 
 interface Fixer {
diff --git a/includes/Parsoid/Fixer/BadImageRemover.php 
b/includes/Parsoid/Fixer/BadImageRemover.php
index 7822651..1f1c0d4 100644
--- a/includes/Parsoid/Fixer/BadImageRemover.php
+++ b/includes/Parsoid/Fixer/BadImageRemover.php
@@ -4,7 +4,6 @@
 
 use DOMElement;
 use DOMNode;
-use Flow\Model\PostRevision;
 use Flow\Parsoid\Fixer;
 use Flow\Conversion\Utils;
 use Title;
diff --git a/includes/Parsoid/Fixer/WikiLinkFixer.php 
b/includes/Parsoid/Fixer/WikiLinkFixer.php
index 9fc10c1..d7d5dc6 100644
--- a/includes/Parsoid/Fixer/WikiLinkFixer.php
+++ b/includes/Parsoid/Fixer/WikiLinkFixer.php
@@ -2,10 +2,8 @@
 
 namespace Flow\Parsoid\Fixer;
 
-use ArrayObject;
 use DOMElement;
 use DOMNode;
-use Flow\Model\PostRevision;
 use Flow\Parsoid\Fixer;
 use Flow\Conversion\Utils;
 use LinkBatch;
diff --git a/includes/Repository/MultiGetList.php 
b/includes/Repository/MultiGetList.php
index c416e2d..e8afe91 100644
--- a/includes/Repository/MultiGetList.php
+++ b/includes/Repository/MultiGetList.php
@@ -4,7 +4,6 @@
 
 use Flow\Data\BufferedCache;
 use Flow\Model\UUID;
-use Flow\Container;
 use Flow\Exception\InvalidInputException;
 
 class MultiGetList {
diff --git a/includes/Repository/TreeRepository.php 
b/includes/Repository/TreeRepository.php
index 41786c5..8d43cda 100644
--- a/includes/Repository/TreeRepository.php
+++ b/includes/Repository/TreeRepository.php
@@ -7,7 +7,6 @@
 use Flow\DbFactory;
 use Flow\Model\UUID;
 use BagOStuff;
-use Flow\Container;
 use Flow\Exception\DataModelException;
 
 /*
diff --git a/includes/RevisionActionPermissions.php 
b/includes/RevisionActionPermissions.php
index faf1535..1a8fad0 100644
--- a/includes/RevisionActionPermissions.php
+++ b/includes/RevisionActionPermissions.php
@@ -5,7 +5,6 @@
 use Flow\Collection\CollectionCache;
 use Flow\Collection\PostCollection;
 use Flow\Exception\DataModelException;
-use Flow\Exception\FlowException;
 use Flow\Model\AbstractRevision;
 use Flow\Model\PostRevision;
 use Closure;
diff --git a/includes/Search/Iterators/AbstractIterator.php 
b/includes/Search/Iterators/AbstractIterator.php
index 1e19c30..9693de7 100644
--- a/includes/Search/Iterators/AbstractIterator.php
+++ b/includes/Search/Iterators/AbstractIterator.php
@@ -6,7 +6,6 @@
 use Flow\Container;
 use Flow\Data\ManagerGroup;
 use Flow\DbFactory;
-use Flow\Exception\InvalidDataException;
 use Flow\Model\AbstractRevision;
 use Flow\Model\UUID;
 use Iterator;
diff --git a/includes/Search/Iterators/TopicIterator.php 
b/includes/Search/Iterators/TopicIterator.php
index f30d3d7..d91365b 100644
--- a/includes/Search/Iterators/TopicIterator.php
+++ b/includes/Search/Iterators/TopicIterator.php
@@ -3,7 +3,6 @@
 namespace Flow\Search\Iterators;
 
 use Flow\DbFactory;
-use Flow\Exception\InvalidDataException;
 use Flow\Model\PostRevision;
 use Flow\Model\UUID;
 use Flow\Repository\RootPostLoader;
diff --git a/includes/Search/Searcher.php b/includes/Search/Searcher.php
index d813f78..5aee0ee 100644
--- a/includes/Search/Searcher.php
+++ b/includes/Search/Searcher.php
@@ -6,7 +6,6 @@
 use Elastica\Query\QueryString;
 use Elastica\Exception\ExceptionInterface;
 use Elastica\Request;
-use Elastica\ResultSet;
 use Flow\Container;
 use PoolCounterWorkViaCallback;
 use Status;
diff --git a/includes/SpamFilter/AbuseFilter.php 
b/includes/SpamFilter/AbuseFilter.php
index 559741a..dccaaac 100644
--- a/includes/SpamFilter/AbuseFilter.php
+++ b/includes/SpamFilter/AbuseFilter.php
@@ -6,7 +6,6 @@
 use IContextSource;
 use Status;
 use Title;
-use User;
 
 class AbuseFilter implements SpamFilter {
        /**
diff --git a/includes/Templating.php b/includes/Templating.php
index 1cdf2ed..3e3300c 100644
--- a/includes/Templating.php
+++ b/includes/Templating.php
@@ -12,7 +12,6 @@
 use OutputPage;
 // These don't really belong here
 use Linker;
-use Message;
 
 /**
  * This class is slowly being deprecated. It used to house a minimalist
diff --git a/includes/View.php b/includes/View.php
index e8dbdff..fc24dab 100644
--- a/includes/View.php
+++ b/includes/View.php
@@ -8,13 +8,11 @@
 use Flow\Model\Anchor;
 use Flow\Model\UUID;
 use Flow\Model\Workflow;
-use FormatJson;
 use Html;
 use Hooks;
 use IContextSource;
 use Message;
 use OutputPage;
-use ResourceLoader;
 use Title;
 use WebRequest;
 
diff --git a/maintenance/convertLqtPageFromRemoteApiForTesting.php 
b/maintenance/convertLqtPageFromRemoteApiForTesting.php
index 25bdee9..37c3d17 100644
--- a/maintenance/convertLqtPageFromRemoteApiForTesting.php
+++ b/maintenance/convertLqtPageFromRemoteApiForTesting.php
@@ -1,13 +1,8 @@
 <?php
 
 use Flow\Import\FileImportSourceStore;
-use Flow\Import\LiquidThreadsApi\BaseConversionStrategy as 
LiquidThreadsApiBaseConversionStrategy;
-use Flow\Import\LiquidThreadsApi\RemoteConversionStrategy as 
LiquidThreadsApiRemoteConversionStrategy;
-use Flow\Import\LiquidThreadsApi\LocalApiBackend;
 use Flow\Import\LiquidThreadsApi\RemoteApiBackend;
 use Flow\Import\LiquidThreadsApi\ImportSource as LiquidThreadsApiImportSource;
-use Flow\Import\Postprocessor\LqtRedirector;
-use Flow\Import\Postprocessor\LqtNotifications;
 use Psr\Log\LogLevel;
 
 require_once ( getenv( 'MW_INSTALL_PATH' ) !== false
diff --git a/maintenance/convertLqtPageOnLocalWiki.php 
b/maintenance/convertLqtPageOnLocalWiki.php
index 3009c0d..840993e 100644
--- a/maintenance/convertLqtPageOnLocalWiki.php
+++ b/maintenance/convertLqtPageOnLocalWiki.php
@@ -2,13 +2,8 @@
 
 use Flow\Container;
 use Flow\Import\FileImportSourceStore;
-use Flow\Import\NullImportSourceStore;
 use Flow\Import\LiquidThreadsApi\ConversionStrategy as 
LiquidThreadsApiConversionStrategy;
 use Flow\Import\LiquidThreadsApi\LocalApiBackend;
-use Flow\Import\LiquidThreadsApi\RemoteApiBackend;
-use Flow\Import\LiquidThreadsApi\ImportSource as LiquidThreadsApiImportSource;
-use Flow\Import\Postprocessor\LqtRedirector;
-use Flow\Import\Postprocessor\LqtNotifications;
 use Psr\Log\LogLevel;
 
 require_once ( getenv( 'MW_INSTALL_PATH' ) !== false
diff --git a/maintenance/convertNamespaceFromWikitext.php 
b/maintenance/convertNamespaceFromWikitext.php
index a8d6d72..d10faa0 100644
--- a/maintenance/convertNamespaceFromWikitext.php
+++ b/maintenance/convertNamespaceFromWikitext.php
@@ -1,7 +1,6 @@
 <?php
 
 use Flow\Utils\NamespaceIterator;
-use Psr\Log\NullLogger;
 
 require_once ( getenv( 'MW_INSTALL_PATH' ) !== false
        ? getenv( 'MW_INSTALL_PATH' ) . '/maintenance/Maintenance.php'
diff --git a/tests/phpunit/BlockFactoryTest.php 
b/tests/phpunit/BlockFactoryTest.php
index 3413da9..df99363 100644
--- a/tests/phpunit/BlockFactoryTest.php
+++ b/tests/phpunit/BlockFactoryTest.php
@@ -3,7 +3,6 @@
 namespace Flow\Tests;
 
 use Flow\BlockFactory;
-use Flow\NotificationController;
 
 /**
  * @group Flow
diff --git a/tests/phpunit/Data/Pager/PagerTest.php 
b/tests/phpunit/Data/Pager/PagerTest.php
index 9838600..0dd2550 100644
--- a/tests/phpunit/Data/Pager/PagerTest.php
+++ b/tests/phpunit/Data/Pager/PagerTest.php
@@ -2,14 +2,8 @@
 
 namespace Flow\Tests\Data\Pager;
 
-use Flow\Data\BagOStuff;
-use Flow\Data\BagOStuff\LocalBufferedBagOStuff;
-use Flow\Data\BufferedCache;
-use Flow\Data\Index\TopKIndex;
 use Flow\Data\Pager\Pager;
-use Flow\Data\Pager\PagerPage;
 use Flow\Model\UUID;
-use stdClass;
 
 /**
  * @group Flow
diff --git a/tests/phpunit/FlowTestCase.php b/tests/phpunit/FlowTestCase.php
index decc326..109b3f2 100644
--- a/tests/phpunit/FlowTestCase.php
+++ b/tests/phpunit/FlowTestCase.php
@@ -2,8 +2,6 @@
 
 namespace Flow\Tests;
 
-use Status;
-
 use Flow\Container;
 use Flow\Model\UUID;
 
diff --git a/tests/phpunit/Handlebars/FlowPostMetaActionsTest.php 
b/tests/phpunit/Handlebars/FlowPostMetaActionsTest.php
index 124f449..4aa7322 100644
--- a/tests/phpunit/Handlebars/FlowPostMetaActionsTest.php
+++ b/tests/phpunit/Handlebars/FlowPostMetaActionsTest.php
@@ -3,7 +3,6 @@
 namespace Flow\Tests\Handlebars;
 
 use Flow\Container;
-use Flow\TemplateHelper;
 use LightnCandy;
 use Symfony\Component\DomCrawler\Crawler;
 
diff --git a/tests/phpunit/Mock/MockImportPost.php 
b/tests/phpunit/Mock/MockImportPost.php
index f9e1a4c..c8200c5 100644
--- a/tests/phpunit/Mock/MockImportPost.php
+++ b/tests/phpunit/Mock/MockImportPost.php
@@ -5,7 +5,6 @@
 use ArrayIterator;
 use Flow\Import\IImportPost;
 use Flow\Import\IObjectRevision;
-use User;
 
 class MockImportPost implements IImportPost {
        /**
diff --git a/tests/phpunit/Mock/MockImportSummary.php 
b/tests/phpunit/Mock/MockImportSummary.php
index 608183d..dbbdf85 100644
--- a/tests/phpunit/Mock/MockImportSummary.php
+++ b/tests/phpunit/Mock/MockImportSummary.php
@@ -5,7 +5,6 @@
 use ArrayIterator;
 use Flow\Import\IObjectRevision;
 use Flow\Import\IImportSummary;
-use User;
 
 class MockImportSummary implements IImportSummary {
        /**
diff --git a/tests/phpunit/Parsoid/Fixer/BadImageRemoverTest.php 
b/tests/phpunit/Parsoid/Fixer/BadImageRemoverTest.php
index a40d2e9..327fc19 100644
--- a/tests/phpunit/Parsoid/Fixer/BadImageRemoverTest.php
+++ b/tests/phpunit/Parsoid/Fixer/BadImageRemoverTest.php
@@ -4,7 +4,6 @@
 
 use Flow\Parsoid\Fixer\BadImageRemover;
 use Flow\Parsoid\ContentFixer;
-use Flow\Conversion\Utils;
 use Title;
 
 /**
diff --git a/tests/phpunit/Parsoid/Fixer/WikiLinkFixerTest.php 
b/tests/phpunit/Parsoid/Fixer/WikiLinkFixerTest.php
index 3ce4948..61fb17c 100644
--- a/tests/phpunit/Parsoid/Fixer/WikiLinkFixerTest.php
+++ b/tests/phpunit/Parsoid/Fixer/WikiLinkFixerTest.php
@@ -2,12 +2,9 @@
 
 namespace Flow\Tests\Parsoid\Fixer;
 
-use Flow\Model\UUID;
 use Flow\Parsoid\ContentFixer;
 use Flow\Parsoid\Fixer\WikiLinkFixer;
-use Flow\Conversion\Utils;
 use Flow\Tests\PostRevisionTestCase;
-use Html;
 use Title;
 
 /**
diff --git a/tests/phpunit/PermissionsTest.php 
b/tests/phpunit/PermissionsTest.php
index b286f13..6d1d410 100644
--- a/tests/phpunit/PermissionsTest.php
+++ b/tests/phpunit/PermissionsTest.php
@@ -7,7 +7,6 @@
 use Flow\Model\AbstractRevision;
 use Flow\Model\PostRevision;
 use Flow\RevisionActionPermissions;
-use Block;
 use User;
 
 /**
diff --git a/tests/phpunit/PostRevisionTestCase.php 
b/tests/phpunit/PostRevisionTestCase.php
index 12d9d84..4492fcb 100644
--- a/tests/phpunit/PostRevisionTestCase.php
+++ b/tests/phpunit/PostRevisionTestCase.php
@@ -6,7 +6,6 @@
 use Flow\Collection\PostCollection;
 use Flow\Container;
 use Flow\Data\ManagerGroup;
-use Flow\Exception\DataModelException;
 use Flow\Exception\FlowException;
 use Flow\Model\AbstractRevision;
 use Flow\Model\PostRevision;
diff --git a/tests/phpunit/api/ApiFlowEditHeaderTest.php 
b/tests/phpunit/api/ApiFlowEditHeaderTest.php
index 72fb432..73edaf8 100644
--- a/tests/phpunit/api/ApiFlowEditHeaderTest.php
+++ b/tests/phpunit/api/ApiFlowEditHeaderTest.php
@@ -2,10 +2,6 @@
 
 namespace Flow\Tests\Api;
 
-use Flow\Container;
-use FlowHooks;
-use User;
-
 /**
  * @group Flow
  * @group medium
diff --git a/tests/phpunit/api/ApiFlowEditPostTest.php 
b/tests/phpunit/api/ApiFlowEditPostTest.php
index 311b6d6..c1a8df4 100644
--- a/tests/phpunit/api/ApiFlowEditPostTest.php
+++ b/tests/phpunit/api/ApiFlowEditPostTest.php
@@ -2,10 +2,6 @@
 
 namespace Flow\Tests\Api;
 
-use Flow\Container;
-use FlowHooks;
-use User;
-
 /**
  * @group Flow
  * @group medium
diff --git a/tests/phpunit/api/ApiFlowEditTitleTest.php 
b/tests/phpunit/api/ApiFlowEditTitleTest.php
index fe4ab66..e79cfaf 100644
--- a/tests/phpunit/api/ApiFlowEditTitleTest.php
+++ b/tests/phpunit/api/ApiFlowEditTitleTest.php
@@ -2,10 +2,6 @@
 
 namespace Flow\Tests\Api;
 
-use Flow\Container;
-use FlowHooks;
-use User;
-
 /**
  * @group Flow
  * @group medium
diff --git a/tests/phpunit/api/ApiFlowEditTopicSummaryTest.php 
b/tests/phpunit/api/ApiFlowEditTopicSummaryTest.php
index d0ca6cf..aa82e89 100644
--- a/tests/phpunit/api/ApiFlowEditTopicSummaryTest.php
+++ b/tests/phpunit/api/ApiFlowEditTopicSummaryTest.php
@@ -2,10 +2,6 @@
 
 namespace Flow\Tests\Api;
 
-use Flow\Container;
-use FlowHooks;
-use User;
-
 /**
  * @group Flow
  * @group medium
diff --git a/tests/phpunit/api/ApiFlowLockTopicTest.php 
b/tests/phpunit/api/ApiFlowLockTopicTest.php
index f7a9918..1b970b9 100644
--- a/tests/phpunit/api/ApiFlowLockTopicTest.php
+++ b/tests/phpunit/api/ApiFlowLockTopicTest.php
@@ -2,10 +2,6 @@
 
 namespace Flow\Tests\Api;
 
-use Flow\Container;
-use FlowHooks;
-use User;
-
 /**
  * @group Flow
  * @group medium
diff --git a/tests/phpunit/api/ApiFlowModeratePostTest.php 
b/tests/phpunit/api/ApiFlowModeratePostTest.php
index b5cab67..9a21f90 100644
--- a/tests/phpunit/api/ApiFlowModeratePostTest.php
+++ b/tests/phpunit/api/ApiFlowModeratePostTest.php
@@ -2,10 +2,7 @@
 
 namespace Flow\Tests\Api;
 
-use Flow\Container;
 use Flow\Model\AbstractRevision;
-use FlowHooks;
-use User;
 
 /**
  * @group Flow
diff --git a/tests/phpunit/api/ApiFlowModerateTopicTest.php 
b/tests/phpunit/api/ApiFlowModerateTopicTest.php
index f0eaf0f..0efdd63 100644
--- a/tests/phpunit/api/ApiFlowModerateTopicTest.php
+++ b/tests/phpunit/api/ApiFlowModerateTopicTest.php
@@ -2,10 +2,7 @@
 
 namespace Flow\Tests\Api;
 
-use Flow\Container;
 use Flow\Model\AbstractRevision;
-use FlowHooks;
-use User;
 
 /**
  * @group Flow
diff --git a/tests/phpunit/api/ApiFlowReplyTest.php 
b/tests/phpunit/api/ApiFlowReplyTest.php
index 02e27ad..6932849 100644
--- a/tests/phpunit/api/ApiFlowReplyTest.php
+++ b/tests/phpunit/api/ApiFlowReplyTest.php
@@ -2,10 +2,6 @@
 
 namespace Flow\Tests\Api;
 
-use Flow\Container;
-use FlowHooks;
-use User;
-
 /**
  * @group Flow
  * @group medium
diff --git a/tests/phpunit/api/ApiFlowViewHeaderTest.php 
b/tests/phpunit/api/ApiFlowViewHeaderTest.php
index fbfa0d0..4f872e2 100644
--- a/tests/phpunit/api/ApiFlowViewHeaderTest.php
+++ b/tests/phpunit/api/ApiFlowViewHeaderTest.php
@@ -2,10 +2,6 @@
 
 namespace Flow\Tests\Api;
 
-use Flow\Container;
-use FlowHooks;
-use User;
-
 /**
  * @group Flow
  * @group medium
diff --git a/tests/phpunit/api/ApiTestCase.php 
b/tests/phpunit/api/ApiTestCase.php
index f88cb1a..ecbea17 100644
--- a/tests/phpunit/api/ApiTestCase.php
+++ b/tests/phpunit/api/ApiTestCase.php
@@ -5,7 +5,6 @@
 use ApiTestCase as BaseApiTestCase;
 use Flow\Container;
 use FlowHooks;
-use TestUser;
 use User;
 
 /**

-- 
To view, visit https://gerrit.wikimedia.org/r/256676
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ibd77b57210c4658bd216798d2e89ba6c1accf307
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Flow
Gerrit-Branch: master
Gerrit-Owner: Thiemo Mättig (WMDE) <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to