Clarify WikiRevision::downloadSource() and related code
authorLucas Werkmeister <lucas.werkmeister@wikimedia.de>
Wed, 12 Jun 2019 15:28:28 +0000 (17:28 +0200)
committerLucas Werkmeister <lucas.werkmeister@wikimedia.de>
Wed, 12 Jun 2019 15:32:26 +0000 (17:32 +0200)
UploadImporter was the name of the new class in the first patch sets of
change I4a6c573fc0, but by the time it was merged as commit 25fbfd9b9c
it had been split into an UploadRevisionImporter interface with an
ImportableUploadRevisionImporter implementation; however, not all the
references to those methods were fully updated.

Also, downloadSource() is not actually intended as a replacement method
– it was introduced, already deprecated, only to avoid going through the
deprecation process, with the intention of removing it (and making the
implementation private) once enough time had passed. Update the comments
to clarify this as well.

Change-Id: I50a07c0db102cdc98e5b7c1a176f401b87d627c9

includes/import/ImportableUploadRevisionImporter.php
includes/import/WikiRevision.php

index 40c9417..4be13b0 100644 (file)
@@ -139,9 +139,9 @@ class ImportableUploadRevisionImporter implements UploadRevisionImporter {
 
        /**
         * @deprecated DO NOT CALL ME.
-        * This method was introduced when factoring UploadImporter out of WikiRevision.
-        * It only has 1 use by the deprecated downloadSource method in WikiRevision.
-        * Do not use this in new code.
+        * This method was introduced when factoring (Importable)UploadRevisionImporter out of
+        * WikiRevision. It only has 1 use by the deprecated downloadSource method in WikiRevision.
+        * Do not use this in new code, it will be made private soon.
         *
         * @param ImportableUploadRevision $wikiRevision
         *
index c006874..cae9542 100644 (file)
@@ -636,7 +636,7 @@ class WikiRevision implements ImportableUploadRevision, ImportableOldRevision {
 
        /**
         * @since 1.12.2
-        * @deprecated in 1.31. Use UploadImporter::import
+        * @deprecated in 1.31. Use UploadRevisionImporter::import
         * @return bool
         */
        public function importUpload() {
@@ -647,7 +647,7 @@ class WikiRevision implements ImportableUploadRevision, ImportableOldRevision {
 
        /**
         * @since 1.12.2
-        * @deprecated in 1.31. Use UploadImporter::downloadSource
+        * @deprecated in 1.31. No replacement
         * @return bool|string
         */
        public function downloadSource() {