Legoktm has uploaded a new change for review.

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

Change subject: Move FileContentsHasher into includes/utils/
......................................................................

Move FileContentsHasher into includes/utils/

The class only contains two dependencies upon MediaWiki (ObjectCache &
wfGlobalCacheKey) which are suitable for inclusion in the utils
directory.

Change-Id: I85b4c763be2670c40f26d93e75cedcb68eaa7987
---
M autoload.php
R includes/utils/FileContentsHasher.php
R tests/phpunit/includes/utils/FileContentsHasherTest.php
3 files changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/50/240950/1

diff --git a/autoload.php b/autoload.php
index 9cb5b43..f1b0a6c 100644
--- a/autoload.php
+++ b/autoload.php
@@ -430,7 +430,7 @@
        'FileBackendStoreShardListIterator' => __DIR__ . 
'/includes/filebackend/FileBackendStore.php',
        'FileBasedSiteLookup' => __DIR__ . 
'/includes/site/FileBasedSiteLookup.php',
        'FileCacheBase' => __DIR__ . '/includes/cache/FileCacheBase.php',
-       'FileContentsHasher' => __DIR__ . '/includes/FileContentsHasher.php',
+       'FileContentsHasher' => __DIR__ . 
'/includes/utils/FileContentsHasher.php',
        'FileDeleteForm' => __DIR__ . '/includes/FileDeleteForm.php',
        'FileDependency' => __DIR__ . '/includes/cache/CacheDependency.php',
        'FileDuplicateSearchPage' => __DIR__ . 
'/includes/specials/SpecialFileDuplicateSearch.php',
diff --git a/includes/FileContentsHasher.php 
b/includes/utils/FileContentsHasher.php
similarity index 100%
rename from includes/FileContentsHasher.php
rename to includes/utils/FileContentsHasher.php
diff --git a/tests/phpunit/includes/FileContentsHasherTest.php 
b/tests/phpunit/includes/utils/FileContentsHasherTest.php
similarity index 96%
rename from tests/phpunit/includes/FileContentsHasherTest.php
rename to tests/phpunit/includes/utils/FileContentsHasherTest.php
index eb63649..a03e1fc 100644
--- a/tests/phpunit/includes/FileContentsHasherTest.php
+++ b/tests/phpunit/includes/utils/FileContentsHasherTest.php
@@ -8,7 +8,7 @@
        public function provideSingleFile() {
                return array_map( function ( $file ) {
                        return array( $file, file_get_contents( $file ) );
-               }, glob( __DIR__ . '/../data/filecontentshasher/*.*' ) );
+               }, glob( __DIR__ . '/../../data/filecontentshasher/*.*' ) );
        }
 
        public function provideMultipleFiles() {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I85b4c763be2670c40f26d93e75cedcb68eaa7987
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Legoktm <legoktm.wikipe...@gmail.com>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to