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

Change subject: Merge master into deployment
......................................................................


Merge master into deployment

6a0bf8c61d5c639bd7982d6db08fb8fffb04aaad More details for PendingQueueConsumer 
log
43e6873a47852313f066f9751a7ab023b46e88f3 Remove APC Configuration caching
9ae7c1e6844f2c2fdd2e793d9a04afdb43dd664d smashpig paypal listener
b1c71d0a295838973a430df25516938908d3b3a0 Payments API for PayPal
6f02a7f0317031b5119adb0f8703d9dfbb07abbf Test failure path

Change-Id: Iba6dcb1834a87122d6ffef9000f9ca5b94c84739
---
M Core/Configuration.php
D Tests/MockDataStore.php
2 files changed, 0 insertions(+), 202 deletions(-)

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



diff --git a/Core/Configuration.php b/Core/Configuration.php
index a57828a..f599160 100644
--- a/Core/Configuration.php
+++ b/Core/Configuration.php
@@ -185,85 +185,6 @@
         */
        public function override( $data ) {
                static::treeMerge( $this->options, $data );
-<<<<<<< HEAD   (872d29 Revert "Live hack to dump configuration")
-       }
-
-       /**
-        * Loads a configuration file from the cache if it is still valid (ie: 
source files have not
-        * changed)
-        *
-        * TODO: Generalize to any caching backend.
-        *
-        * @param array  $paths    Paths we read from
-        *
-        * @return bool True if the config was loaded successfully.
-        */
-       protected function loadConfigFromCache( $paths ) {
-               if ( !$this->hasApc() ) {
-                       return false;
-               }
-
-               $fileModifiedTimes = array_map( function ( $path ) {
-                       $fileModifiedTimes[] = filemtime( $path );
-               }, $paths );
-
-               // TODO: Cache the config for each installation's paths.
-               $cacheObj = apc_fetch( "smashpig-settings-{$this->viewName}", 
$success );
-
-               if ( !$success
-                       || empty( $cacheObj['configTimes'] )
-                       || empty( $cacheObj['paths'] )
-               ) {
-                       return false;
-               }
-
-               if ( implode( ':', $paths ) === $cacheObj['paths']
-                       && implode( ':', $fileModifiedTimes ) === 
$cacheObj['configTimes']
-               ) {
-                       // The cached values are valid
-                       // TODO: log safely.
-                       $this->options = $cacheObj['values'];
-                       return true;
-               }
-
-               return false;
-       }
-
-       protected function hasApc() {
-// livehack: no.
-return false;
-               static $useApc = null;
-               if ( $useApc === null ) {
-                       $useApc = extension_loaded( 'apc' );
-               }
-               return $useApc;
-       }
-
-       /**
-        * Saves the loaded configuration to the cache.
-        *
-        * @param array $paths Paths we read from
-        * @param string $node Node name that we're saving to cache
-        */
-       protected function saveConfigToCache( $paths ) {
-               if ( !$this->hasApc() ) {
-                       return;
-               }
-
-               $fileModifiedTimes = array_map( function ( $path ) {
-                       $fileModifiedTimes[] = filemtime( $path );
-               }, $paths );
-
-               apc_store(
-                       "smashpig-settings-{$this->viewName}",
-                       array(
-                                'paths' => implode( ':', $paths ),
-                                'configTimes' => implode( ':', 
$fileModifiedTimes ),
-                                'values' => $this->options,
-                       )
-               );
-=======
->>>>>>> BRANCH (6f02a7 Test failure path)
        }
 
        /**
diff --git a/Tests/MockDataStore.php b/Tests/MockDataStore.php
deleted file mode 100644
index 594af00..0000000
--- a/Tests/MockDataStore.php
+++ /dev/null
@@ -1,123 +0,0 @@
-<<<<<<< HEAD   (872d29 Revert "Live hack to dump configuration")
-=======
-<?php
-namespace SmashPig\Tests;
-
-use SmashPig\Core\DataStores\DataStoreException;
-use SmashPig\Core\DataStores\DataStoreTransactionException;
-use SmashPig\Core\DataStores\KeyedOpaqueDataStore;
-use SmashPig\Core\DataStores\KeyedOpaqueStorableObject;
-use SmashPig\Core\SmashPigException;
-
-/**
- * Fakes some data store behavior for tests
- * TODO: anything that cares about message type
- * Class MockDataStore
- */
-class MockDataStore extends KeyedOpaqueDataStore {
-
-       protected $messages = array();
-
-       protected $currentQueue = null;
-
-       public function __construct() {
-       }
-
-       /**
-        * Adds an object to the persistent data store.
-        *
-        * @param \SmashPig\Core\DataStores\KeyedOpaqueStorableObject $obj
-        *
-        * @throws \SmashPig\Core\DataStores\DataStoreException if the message 
could not be stored.
-        * @return null
-        */
-       public function addObject( KeyedOpaqueStorableObject $obj ) {
-               $keys = $obj->getObjectKeys();
-               // FIXME magic string is magic
-               if ( !array_key_exists( 'correlationId', $keys ) ) {
-                       throw new DataStoreException(
-                               "Required property correlationId was not 
exposed."
-                       );
-               }
-               $corrId = $keys['correlationId'];
-               if ( !isset( $this->messages[$corrId] ) ) {
-                       $this->messages[$corrId] = array();
-               }
-               array_push( $this->messages[$corrId], $obj );
-       }
-
-       /**
-        * Remove objects with the same serialization type and correlation ID 
from the
-        * persistent store.
-        * @param \SmashPig\Core\DataStores\KeyedOpaqueStorableObject $protoObj 
Prototype to remove.
-        *
-        * @return int Count of messages removed.
-        */
-       public function removeObjects( KeyedOpaqueStorableObject $protoObj ) {
-               // TODO
-       }
-
-       /**
-        * Remove objects with a given correlation ID from the store.
-        *
-        * @param string $id Correlation ID of messages to remove
-        *
-        * @return int Count of messages removed.
-        */
-       public function removeObjectsById( $id ) {
-               if ( isset( $this->messages[$id] ) ) {
-                       unset( $this->messages[$id] );
-               }
-       }
-
-       /**
-        *
-        * If a object has not yet been completely acked when this function 
gets called,
-        * it will throw a DataStoreTransactionException exception.
-        *
-        * If there were no objects fitting the filter, null will be returned.
-        *
-        * @param string|null $type ignored
-        * @param null|string $id The correlation ID of the message
-        *
-        * @throws \SmashPig\Core\DataStores\DataStoreTransactionException
-        * @return KeyedOpaqueStorableObject|null
-        */
-       public function queueGetObject( $type = null, $id = null ) {
-               if ( $id === null ) {
-                       throw new SmashPigException( 'Need id for mock queue' );
-               }
-               if ( empty( $this->messages[$id] ) ) {
-                       return null;
-               }
-               $this->currentQueue = & $this->messages[$id];
-               return $this->currentQueue[0];
-       }
-
-       /**
-        * Acknowledges and removes from the backing data store the current 
queue object
-        */
-       public function queueAckObject() {
-               if ( !$this->currentQueue ) {
-                       throw new DataStoreTransactionException(
-                               "No STOMP transaction currently in progress. 
Cannot ACK a non-existent message!"
-                       );
-               }
-               array_shift( $this->currentQueue );
-       }
-
-       /**
-        * Acknowledges and replaces into the backing data store the current 
queue object
-        */
-       public function queueIgnoreObject() {
-               if ( !$this->currentQueue ) {
-                       throw new DataStoreTransactionException(
-                               "No STOMP transaction currently in progress. 
Cannot ACK a non-existent message!"
-                       );
-               }
-               $currentMessage = $this->currentQueue[0];
-               $this->queueAckObject();
-               $this->addObject( $currentMessage );
-       }
-}
->>>>>>> BRANCH (6f02a7 Test failure path)

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iba6dcb1834a87122d6ffef9000f9ca5b94c84739
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/SmashPig
Gerrit-Branch: deployment
Gerrit-Owner: Awight <awi...@wikimedia.org>
Gerrit-Reviewer: Awight <awi...@wikimedia.org>
Gerrit-Reviewer: jenkins-bot <>

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

Reply via email to