Browse Source

Update deprecated method usages.

ADmad 8 years ago
parent
commit
f22002d648

+ 1 - 1
src/Database/Driver/Mysql.php

@@ -103,7 +103,7 @@ class Mysql extends Driver
         $this->_connect($dsn, $config);
 
         if (!empty($config['init'])) {
-            $connection = $this->connection();
+            $connection = $this->getConnection();
             foreach ((array)$config['init'] as $command) {
                 $connection->exec($command);
             }

+ 1 - 1
src/Database/Driver/Sqlite.php

@@ -74,7 +74,7 @@ class Sqlite extends Driver
 
         if (!empty($config['init'])) {
             foreach ((array)$config['init'] as $command) {
-                $this->connection()->exec($command);
+                $this->getConnection()->exec($command);
             }
         }
 

+ 1 - 1
src/Database/Statement/MysqlStatement.php

@@ -32,7 +32,7 @@ class MysqlStatement extends PDOStatement
      */
     public function execute($params = null)
     {
-        $connection = $this->_driver->connection();
+        $connection = $this->_driver->getConnection();
 
         try {
             $connection->setAttribute(PDO::MYSQL_ATTR_USE_BUFFERED_QUERY, $this->_bufferResults);

+ 1 - 1
tests/TestCase/ORM/CompositeKeysTest.php

@@ -754,7 +754,7 @@ class CompositeKeyTest extends TestCase
         if ($driver instanceof Sqlserver) {
             $this->markTestSkipped('Sqlserver does not support the requirements of this test.');
         } elseif ($driver instanceof Sqlite) {
-            $serverVersion = $driver->connection()->getAttribute(PDO::ATTR_SERVER_VERSION);
+            $serverVersion = $driver->getConnection()->getAttribute(PDO::ATTR_SERVER_VERSION);
             if (version_compare($serverVersion, '3.15.0', '<')) {
                 $this->markTestSkipped("Sqlite ($serverVersion) does not support the requirements of this test.");
             }