diff --git a/src/Cache/Engine/MemcachedEngine.php b/src/Cache/Engine/MemcachedEngine.php index bcd8a64f8cc..4020a3f2f79 100644 --- a/src/Cache/Engine/MemcachedEngine.php +++ b/src/Cache/Engine/MemcachedEngine.php @@ -45,7 +45,7 @@ class MemcachedEngine extends CacheEngine { * - `duration` Specify how long items in this cache configuration last. * - `groups` List of groups or 'tags' associated to every key stored in this config. * handy for deleting a complete group from cache. - * - `login` Login to access the Memcache server + * - `username` Login to access the Memcache server * - `password` Password to access the Memcache server * - `persistent` The name of the persistent connection. All configurations using * the same persistent value will share a single underlying connection. @@ -67,7 +67,7 @@ class MemcachedEngine extends CacheEngine { 'compress' => false, 'duration' => 3600, 'groups' => [], - 'login' => null, + 'username' => null, 'password' => null, 'persistent' => false, 'prefix' => 'cake_', @@ -147,14 +147,14 @@ public function init(array $config = []) { } } - if ($this->_config['login'] !== null && $this->_config['password'] !== null) { + if ($this->_config['username'] !== null && $this->_config['password'] !== null) { if (!method_exists($this->_Memcached, 'setSaslAuthData')) { throw new InvalidArgumentException( 'Memcached extension is not build with SASL support' ); } $this->_Memcached->setSaslAuthData( - $this->_config['login'], + $this->_config['username'], $this->_config['password'] ); } diff --git a/src/Database/Connection.php b/src/Database/Connection.php index 1e511d93530..13de5151419 100644 --- a/src/Database/Connection.php +++ b/src/Database/Connection.php @@ -661,7 +661,7 @@ protected function _newLogger(StatementInterface $statement) { public function __debugInfo() { $secrets = [ 'password' => '*****', - 'login' => '*****', + 'username' => '*****', 'host' => '*****', 'database' => '*****', 'port' => '*****', diff --git a/src/Database/Driver/Mysql.php b/src/Database/Driver/Mysql.php index 455c460f598..80a044dd1d1 100644 --- a/src/Database/Driver/Mysql.php +++ b/src/Database/Driver/Mysql.php @@ -30,7 +30,7 @@ class Mysql extends \Cake\Database\Driver { protected $_baseConfig = [ 'persistent' => true, 'host' => 'localhost', - 'login' => 'root', + 'username' => 'root', 'password' => '', 'database' => 'cake', 'port' => '3306', diff --git a/src/Database/Driver/PDODriverTrait.php b/src/Database/Driver/PDODriverTrait.php index be5d3fbe790..f7c8d0dfffd 100644 --- a/src/Database/Driver/PDODriverTrait.php +++ b/src/Database/Driver/PDODriverTrait.php @@ -38,7 +38,7 @@ trait PDODriverTrait { protected function _connect(array $config) { $connection = new PDO( $config['dsn'], - $config['login'], + $config['username'], $config['password'], $config['flags'] ); diff --git a/src/Database/Driver/Postgres.php b/src/Database/Driver/Postgres.php index 290d481681d..b7baeeb1cba 100644 --- a/src/Database/Driver/Postgres.php +++ b/src/Database/Driver/Postgres.php @@ -30,7 +30,7 @@ class Postgres extends \Cake\Database\Driver { protected $_baseConfig = [ 'persistent' => true, 'host' => 'localhost', - 'login' => 'root', + 'username' => 'root', 'password' => '', 'database' => 'cake', 'schema' => 'public', diff --git a/src/Database/Driver/Sqlite.php b/src/Database/Driver/Sqlite.php index 27e6248c8e5..ab367ffa57e 100644 --- a/src/Database/Driver/Sqlite.php +++ b/src/Database/Driver/Sqlite.php @@ -31,7 +31,7 @@ class Sqlite extends \Cake\Database\Driver { */ protected $_baseConfig = [ 'persistent' => false, - 'login' => null, + 'username' => null, 'password' => null, 'database' => ':memory:', 'encoding' => 'utf8', diff --git a/src/Database/Driver/Sqlserver.php b/src/Database/Driver/Sqlserver.php index 0f1e8a5de02..2e38f7a122e 100644 --- a/src/Database/Driver/Sqlserver.php +++ b/src/Database/Driver/Sqlserver.php @@ -34,7 +34,7 @@ class Sqlserver extends \Cake\Database\Driver { protected $_baseConfig = [ 'persistent' => false, 'host' => 'localhost\SQLEXPRESS', - 'login' => '', + 'username' => '', 'password' => '', 'database' => 'cake', 'encoding' => PDO::SQLSRV_ENCODING_UTF8, diff --git a/tests/TestCase/Cache/Engine/MemcachedEngineTest.php b/tests/TestCase/Cache/Engine/MemcachedEngineTest.php index ad84690cc27..2b702e3172c 100644 --- a/tests/TestCase/Cache/Engine/MemcachedEngineTest.php +++ b/tests/TestCase/Cache/Engine/MemcachedEngineTest.php @@ -111,7 +111,7 @@ public function testConfig() { 'servers' => array('127.0.0.1'), 'persistent' => false, 'compress' => false, - 'login' => null, + 'username' => null, 'password' => null, 'groups' => array(), 'serialize' => 'php', @@ -356,7 +356,7 @@ public function testSaslAuthException() { 'engine' => 'Memcached', 'servers' => array('127.0.0.1:11211'), 'persistent' => false, - 'login' => 'test', + 'username' => 'test', 'password' => 'password' ); diff --git a/tests/TestCase/Database/Driver/MysqlTest.php b/tests/TestCase/Database/Driver/MysqlTest.php index d355e9c0f76..2c1ec387be1 100644 --- a/tests/TestCase/Database/Driver/MysqlTest.php +++ b/tests/TestCase/Database/Driver/MysqlTest.php @@ -48,7 +48,7 @@ public function testConnectionConfigDefault() { $expected = [ 'persistent' => true, 'host' => 'localhost', - 'login' => 'root', + 'username' => 'root', 'password' => '', 'database' => 'cake', 'port' => '3306', @@ -79,7 +79,7 @@ public function testConnectionConfigCustom() { 'persistent' => false, 'host' => 'foo', 'database' => 'bar', - 'login' => 'user', + 'username' => 'user', 'password' => 'pass', 'port' => 3440, 'flags' => [1 => true, 2 => false], diff --git a/tests/TestCase/Database/Driver/PostgresTest.php b/tests/TestCase/Database/Driver/PostgresTest.php index a20e945bd74..10102a09af4 100644 --- a/tests/TestCase/Database/Driver/PostgresTest.php +++ b/tests/TestCase/Database/Driver/PostgresTest.php @@ -36,7 +36,7 @@ public function testConnectionConfigDefault() { $expected = [ 'persistent' => true, 'host' => 'localhost', - 'login' => 'root', + 'username' => 'root', 'password' => '', 'database' => 'cake', 'schema' => 'public', @@ -84,7 +84,7 @@ public function testConnectionConfigCustom() { 'persistent' => false, 'host' => 'foo', 'database' => 'bar', - 'login' => 'user', + 'username' => 'user', 'password' => 'pass', 'port' => 3440, 'flags' => [1 => true, 2 => false], diff --git a/tests/TestCase/Database/Driver/SqliteTest.php b/tests/TestCase/Database/Driver/SqliteTest.php index 81834df2f46..40d5da6d662 100644 --- a/tests/TestCase/Database/Driver/SqliteTest.php +++ b/tests/TestCase/Database/Driver/SqliteTest.php @@ -36,7 +36,7 @@ public function testConnectionConfigDefault() { 'persistent' => false, 'database' => ':memory:', 'encoding' => 'utf8', - 'login' => null, + 'username' => null, 'password' => null, 'flags' => [], 'init' => [], @@ -73,7 +73,7 @@ public function testConnectionConfigCustom() { ); $expected = $config; - $expected += ['login' => null, 'password' => null]; + $expected += ['username' => null, 'password' => null]; $expected['dsn'] = 'sqlite:bar.db'; $expected['flags'] += [ PDO::ATTR_PERSISTENT => true, diff --git a/tests/TestCase/Database/Driver/SqlserverTest.php b/tests/TestCase/Database/Driver/SqlserverTest.php index c0af5454c2d..2a18b2c0579 100644 --- a/tests/TestCase/Database/Driver/SqlserverTest.php +++ b/tests/TestCase/Database/Driver/SqlserverTest.php @@ -44,7 +44,7 @@ public function testConnectionConfigCustom() { $config = [ 'persistent' => false, 'host' => 'foo', - 'login' => 'Administrator', + 'username' => 'Administrator', 'password' => 'blablabla', 'database' => 'bar', 'encoding' => 'a-language', diff --git a/tests/bootstrap.php b/tests/bootstrap.php index 011d6ccd631..4c4ac9aaad0 100644 --- a/tests/bootstrap.php +++ b/tests/bootstrap.php @@ -107,7 +107,7 @@ 'driver' => getenv('db_class'), 'dsn' => getenv('db_dsn'), 'database' => getenv('db_database'), - 'login' => getenv('db_login'), + 'username' => getenv('db_login'), 'password' => getenv('db_password'), 'timezone' => 'UTC' ]);