EBernhardson has uploaded a new change for review.

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

Change subject: Fetch Storage from ManagerGroup every time
......................................................................

Fetch Storage from ManagerGroup every time

Caching the storage object internally breaks the ManagerGroup's
cached list of managers that have been used since the last
ManagerGroup::clear() operation.  Just call it directly each time.

Change-Id: Ia4782d553fa07c45518871ea74ccffd8cc93fdba
---
M includes/Collection/AbstractCollection.php
1 file changed, 3 insertions(+), 12 deletions(-)


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

diff --git a/includes/Collection/AbstractCollection.php 
b/includes/Collection/AbstractCollection.php
index 4db16dc..320af64 100644
--- a/includes/Collection/AbstractCollection.php
+++ b/includes/Collection/AbstractCollection.php
@@ -20,11 +20,6 @@
        protected $uuid;
 
        /**
-        * @var \Flow\Data\ObjectManager[]
-        */
-       protected $storage = array();
-
-       /**
         * Array of revisions for this object.
         *
         * @var AbstractRevision[]
@@ -100,13 +95,9 @@
                        $class = $this->getRevisionClass();
                }
 
-               if ( !isset( $this->storage[$class] ) ) {
-                       /** @var ManagerGroup $storage */
-                       $storage = Container::get( 'storage' );
-                       $this->storage[$class] = $storage->getStorage( $class );
-               }
-
-               return $this->storage[$class];
+               /** @var ManagerGroup $storage */
+               $storage = Container::get( 'storage' );
+               return $storage->getStorage( $class );
        }
 
        /**

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia4782d553fa07c45518871ea74ccffd8cc93fdba
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Flow
Gerrit-Branch: master
Gerrit-Owner: EBernhardson <ebernhard...@wikimedia.org>

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

Reply via email to