jenkins-bot has submitted this change and it was merged.

Change subject: Start moving objectcache into libs/
......................................................................


Start moving objectcache into libs/

The base BagOStuff class and some of the implementations are
not dependent on MediaWiki and can be in the libs folder.

Change-Id: I299f9abb778abc65a70461a2aff3015c02a1f04d
---
M autoload.php
R includes/libs/objectcache/APCBagOStuff.php
R includes/libs/objectcache/BagOStuff.php
R includes/libs/objectcache/EmptyBagOStuff.php
R includes/libs/objectcache/HashBagOStuff.php
R includes/libs/objectcache/WinCacheBagOStuff.php
R includes/libs/objectcache/XCacheBagOStuff.php
M includes/objectcache/MultiWriteBagOStuff.php
8 files changed, 9 insertions(+), 9 deletions(-)

Approvals:
  Aaron Schulz: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/autoload.php b/autoload.php
index 705f5bd..a7b36a6 100644
--- a/autoload.php
+++ b/autoload.php
@@ -4,7 +4,7 @@
 global $wgAutoloadLocalClasses;
 
 $wgAutoloadLocalClasses = array(
-       'APCBagOStuff' => __DIR__ . '/includes/objectcache/APCBagOStuff.php',
+       'APCBagOStuff' => __DIR__ . 
'/includes/libs/objectcache/APCBagOStuff.php',
        'AbstractContent' => __DIR__ . '/includes/content/AbstractContent.php',
        'Action' => __DIR__ . '/includes/actions/Action.php',
        'ActiveUsersPager' => __DIR__ . 
'/includes/specials/SpecialActiveusers.php',
@@ -147,7 +147,7 @@
        'BackupDumper' => __DIR__ . '/maintenance/backup.inc',
        'BackupReader' => __DIR__ . '/maintenance/importDump.php',
        'BadTitleError' => __DIR__ . '/includes/exception/BadTitleError.php',
-       'BagOStuff' => __DIR__ . '/includes/objectcache/BagOStuff.php',
+       'BagOStuff' => __DIR__ . '/includes/libs/objectcache/BagOStuff.php',
        'BaseDump' => __DIR__ . '/maintenance/backupPrefetch.inc',
        'BaseTemplate' => __DIR__ . '/includes/skins/BaseTemplate.php',
        'BatchedQueryRunner' => __DIR__ . '/maintenance/runBatchedQuery.php',
@@ -365,7 +365,7 @@
        'EmailInvalidation' => __DIR__ . 
'/includes/specials/SpecialConfirmemail.php',
        'EmailNotification' => __DIR__ . '/includes/mail/EmailNotification.php',
        'EmaillingJob' => __DIR__ . '/includes/jobqueue/jobs/EmaillingJob.php',
-       'EmptyBagOStuff' => __DIR__ . 
'/includes/objectcache/EmptyBagOStuff.php',
+       'EmptyBagOStuff' => __DIR__ . 
'/includes/libs/objectcache/EmptyBagOStuff.php',
        'EmptyBloomCache' => __DIR__ . '/includes/cache/bloom/BloomCache.php',
        'EncryptedPassword' => __DIR__ . 
'/includes/password/EncryptedPassword.php',
        'EnhancedChangesList' => __DIR__ . 
'/includes/changes/EnhancedChangesList.php',
@@ -494,7 +494,7 @@
        'HTMLTextAreaField' => __DIR__ . 
'/includes/htmlform/HTMLTextAreaField.php',
        'HTMLTextField' => __DIR__ . '/includes/htmlform/HTMLTextField.php',
        'HWLDFWordAccumulator' => __DIR__ . '/includes/diff/DairikiDiff.php',
-       'HashBagOStuff' => __DIR__ . '/includes/objectcache/HashBagOStuff.php',
+       'HashBagOStuff' => __DIR__ . 
'/includes/libs/objectcache/HashBagOStuff.php',
        'HashConfig' => __DIR__ . '/includes/config/HashConfig.php',
        'HashRing' => __DIR__ . '/includes/libs/HashRing.php',
        'HashtableReplacer' => __DIR__ . 
'/includes/libs/replacers/HashtableReplacer.php',
@@ -1328,12 +1328,12 @@
        'WikiStatsOutput' => __DIR__ . '/maintenance/language/StatOutputs.php',
        'WikitextContent' => __DIR__ . '/includes/content/WikitextContent.php',
        'WikitextContentHandler' => __DIR__ . 
'/includes/content/WikitextContentHandler.php',
-       'WinCacheBagOStuff' => __DIR__ . 
'/includes/objectcache/WinCacheBagOStuff.php',
+       'WinCacheBagOStuff' => __DIR__ . 
'/includes/libs/objectcache/WinCacheBagOStuff.php',
        'WithoutInterwikiPage' => __DIR__ . 
'/includes/specials/SpecialWithoutinterwiki.php',
        'WordLevelDiff' => __DIR__ . '/includes/diff/DairikiDiff.php',
        'WrapOldPasswords' => __DIR__ . '/maintenance/wrapOldPasswords.php',
        'XCFHandler' => __DIR__ . '/includes/media/XCF.php',
-       'XCacheBagOStuff' => __DIR__ . 
'/includes/objectcache/XCacheBagOStuff.php',
+       'XCacheBagOStuff' => __DIR__ . 
'/includes/libs/objectcache/XCacheBagOStuff.php',
        'XMLRCFeedFormatter' => __DIR__ . 
'/includes/rcfeed/XMLRCFeedFormatter.php',
        'XMPInfo' => __DIR__ . '/includes/media/XMPInfo.php',
        'XMPReader' => __DIR__ . '/includes/media/XMP.php',
diff --git a/includes/objectcache/APCBagOStuff.php 
b/includes/libs/objectcache/APCBagOStuff.php
similarity index 100%
rename from includes/objectcache/APCBagOStuff.php
rename to includes/libs/objectcache/APCBagOStuff.php
diff --git a/includes/objectcache/BagOStuff.php 
b/includes/libs/objectcache/BagOStuff.php
similarity index 99%
rename from includes/objectcache/BagOStuff.php
rename to includes/libs/objectcache/BagOStuff.php
index 5f0b4e2..0b791e5 100644
--- a/includes/objectcache/BagOStuff.php
+++ b/includes/libs/objectcache/BagOStuff.php
@@ -166,7 +166,7 @@
         * @return bool Success
         */
        protected function cas( $casToken, $key, $value, $exptime = 0 ) {
-               throw new MWException( "CAS is not implemented in " . __CLASS__ 
);
+               throw new Exception( "CAS is not implemented in " . __CLASS__ );
        }
 
        /**
diff --git a/includes/objectcache/EmptyBagOStuff.php 
b/includes/libs/objectcache/EmptyBagOStuff.php
similarity index 100%
rename from includes/objectcache/EmptyBagOStuff.php
rename to includes/libs/objectcache/EmptyBagOStuff.php
diff --git a/includes/objectcache/HashBagOStuff.php 
b/includes/libs/objectcache/HashBagOStuff.php
similarity index 100%
rename from includes/objectcache/HashBagOStuff.php
rename to includes/libs/objectcache/HashBagOStuff.php
diff --git a/includes/objectcache/WinCacheBagOStuff.php 
b/includes/libs/objectcache/WinCacheBagOStuff.php
similarity index 100%
rename from includes/objectcache/WinCacheBagOStuff.php
rename to includes/libs/objectcache/WinCacheBagOStuff.php
diff --git a/includes/objectcache/XCacheBagOStuff.php 
b/includes/libs/objectcache/XCacheBagOStuff.php
similarity index 100%
rename from includes/objectcache/XCacheBagOStuff.php
rename to includes/libs/objectcache/XCacheBagOStuff.php
diff --git a/includes/objectcache/MultiWriteBagOStuff.php 
b/includes/objectcache/MultiWriteBagOStuff.php
index 896eaf0..be54e4d 100644
--- a/includes/objectcache/MultiWriteBagOStuff.php
+++ b/includes/objectcache/MultiWriteBagOStuff.php
@@ -40,12 +40,12 @@
         *               the documentation of $wgObjectCaches for more detail.
         *
         * @param array $params
-        * @throws MWException
+        * @throws InvalidArgumentException
         */
        public function __construct( $params ) {
                parent::__construct( $params );
                if ( !isset( $params['caches'] ) ) {
-                       throw new MWException( __METHOD__ . ': the caches 
parameter is required' );
+                       throw new InvalidArgumentException( __METHOD__ . ': the 
caches parameter is required' );
                }
 
                $this->caches = array();

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I299f9abb778abc65a70461a2aff3015c02a1f04d
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Legoktm <[email protected]>
Gerrit-Reviewer: Aaron Schulz <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

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

Reply via email to