mirror of
https://github.com/predis/predis.git
synced 2026-08-30 12:15:03 +00:00
Remove the 'on_connection_initialized' client option (useless in the vast majority of cases).
This commit is contained in:
@@ -59,12 +59,6 @@ class Client {
|
||||
private function createConnection($parameters) {
|
||||
$connection = $this->_schemes->newConnection($parameters);
|
||||
$this->pushInitCommands($connection);
|
||||
|
||||
$callback = $this->_options->on_connection_initialized;
|
||||
if ($callback !== null) {
|
||||
$callback($this, $connection);
|
||||
}
|
||||
|
||||
return $connection;
|
||||
}
|
||||
|
||||
|
||||
@@ -22,13 +22,6 @@ class ClientOptions {
|
||||
self::$_sharedOptions = array(
|
||||
'profile' => new ClientProfile(),
|
||||
'key_distribution' => new ClientKeyDistribution(),
|
||||
'on_connection_initialized' => new CustomOption(array(
|
||||
'validate' => function($value) {
|
||||
if (is_callable($value)) {
|
||||
return $value;
|
||||
}
|
||||
},
|
||||
)),
|
||||
'connections' => new CustomOption(array(
|
||||
'default' => function() {
|
||||
return new ConnectionSchemes();
|
||||
|
||||
Reference in New Issue
Block a user