Selaa lähdekoodia

Remove some obsoleted or useless methods from Predis\Client.

Daniele Alessandri 11 vuotta sitten
vanhempi
commit
7649533141
2 muutettua tiedostoa jossa 0 lisäystä ja 39 poistoa
  1. 0 27
      lib/Predis/Client.php
  2. 0 12
      tests/Predis/ClientTest.php

+ 0 - 27
lib/Predis/Client.php

@@ -129,16 +129,6 @@ class Client implements ClientInterface
         return $this->options;
     }
 
-    /**
-     * Returns the connection factory object used by the client.
-     *
-     * @return ConnectionFactoryInterface
-     */
-    public function getConnectionFactory()
-    {
-        return $this->options->connections;
-    }
-
     /**
      * Returns a new instance of a client for the specified connection when the
      * client is connected to a cluster. The new instance will use the same
@@ -391,23 +381,6 @@ class Client implements ClientInterface
         return isset($callable) ? $transaction->execute($callable) : $transaction;
     }
 
-    /**
-     * Creates a new Publish / Subscribe context and returns it, or executes it
-     * inside the optionally provided callable object.
-     *
-     * @deprecated This method will change in the next major release to support
-     *             the new PUBSUB command introduced in Redis 2.8. Please use
-     *             Client::pubSubLoop() to create Predis\PubSub\PubSubContext
-     *             instances from now on.
-     *
-     * @param mixed $arg,... Options for the context, a callable object, or both.
-     * @return PubSubExecContext|array
-     */
-    public function pubSub(/* arguments */)
-    {
-        return call_user_func_array(array($this, 'pubSubLoop'), func_get_args());
-    }
-
     /**
      * Creates a new Publish / Subscribe context and returns it, or executes it
      * inside the optionally provided callable object.

+ 0 - 12
tests/Predis/ClientTest.php

@@ -247,8 +247,6 @@ class ClientTest extends StandardTestCase
         $this->assertSame($profile->getVersion(), ServerProfile::get('2.0')->getVersion());
         $this->assertInstanceOf('Predis\Command\Processor\KeyPrefixProcessor', $profile->getProcessor());
         $this->assertSame('prefix:', $profile->getProcessor()->getPrefix());
-
-        $this->assertSame($factory, $client->getConnectionFactory());
     }
 
     /**
@@ -634,16 +632,6 @@ class ClientTest extends StandardTestCase
         $client->pubSubLoop($options, $callable);
     }
 
-    /**
-     * @group disconnected
-     */
-    public function testPubSubIsAliasForPubSubLoop()
-    {
-        $client = new Client();
-
-        $this->assertInstanceOf('Predis\PubSub\PubSubContext', $client->pubSub());
-    }
-
     /**
      * @group disconnected
      */