Closed ntd1712 closed 9 years ago
Thank you @ntd1712 for raising this one, but I think it's not a good idea, because if you hard code the like driver
=> 'pro' . $params['driver']you can't use other drivers that doesn't start with
pdolike
mysql,
drizzle_pdo_mysql`, and etc... Also this will violate O in SOLID Principle -
Yes, I see. I just want to inform you about the issue :)
Thanks @ntd1712
Currently I modify line 45 to " 'driver' => 'pdo_' . $params['driver'] " to fix the bug.
[2015-04-11 09:35:05] local.ERROR: exception 'Doctrine\DBAL\DBALException' with message 'The given 'driver' mysql is unknown, Doctrine currently supports only the following drivers: pdo_mysql, pdo_sqlite, pdo_pgsql, pdo_oci, oci8, ibm_db2, pdo_sqlsrv, mysqli, drizzle_pdo_mysql, sqlanywhere, sqlsrv' in D:\wamp\www\laravel\backend\vendor\doctrine\dbal\lib\Doctrine\DBAL\DBALException.php:95 Stack trace:
0 D:\wamp\www\laravel\backend\vendor\doctrine\dbal\lib\Doctrine\DBAL\DriverManager.php(207): Doctrine\DBAL\DBALException::unknownDriver('mysql', Array)
1 D:\wamp\www\laravel\backend\vendor\doctrine\dbal\lib\Doctrine\DBAL\DriverManager.php(153): Doctrine\DBAL\DriverManager::_checkParams(Array)
2 D:\wamp\www\laravel\backend\vendor\paolooo\laravel-doctrine\src\DriverManagerProvider.php(25): Doctrine\DBAL\DriverManager::getConnection(Array)
3 D:\wamp\www\laravel\backend\vendor\paolooo\laravel-doctrine\src\ProxyEntityManager.php(13): Paolooo\LaravelDoctrine\DriverManagerProvider->connection()
4 [internal function]: Paolooo\LaravelDoctrine\ProxyEntityManager->__construct(Object(Paolooo\LaravelDoctrine\EntityManagerProvider))