1
0
mirror of https://github.com/delight-im/PHP-Auth.git synced 2025-08-02 06:10:14 +02:00

Remove enforcement of hard dependency on 'mysqlnd' in code

This commit is contained in:
Marco
2017-06-20 02:19:46 +02:00
parent 26cb41e992
commit 47afa1c411
2 changed files with 0 additions and 12 deletions

View File

@@ -40,8 +40,6 @@ class DatabaseError extends AuthError {}
class DatabaseDriverError extends DatabaseError {}
class WrongMysqlDatabaseDriverError extends DatabaseDriverError {}
class MissingCallbackError extends AuthError {}
class HeadersAlreadySentError extends AuthError {}

View File

@@ -66,16 +66,6 @@ abstract class UserManager {
throw new \InvalidArgumentException('The database connection must be an instance of either `PdoDatabase`, `PdoDsn` or `PDO`');
}
$this->db->addOnConnectListener(function (PdoDatabase $db) {
// if a MySQL database is used
if ($db->getDriverName() === 'MySQL') {
// if the required MySQL Native Driver (mysqlnd) is not used (but instead the older MySQL Client Library (libmysqlclient))
if (\extension_loaded('mysqlnd') === false && \stripos($db->getClientVersion(), 'mysqlnd') === false) {
throw new WrongMysqlDatabaseDriverError('You must use PDO with the newer \'mysqlnd\' driver instead of the older \'libmysqlclient\' driver');
}
}
});
}
/**