Open jacekjagiello opened 9 years ago
Note, that if I switch driver to mysql
in my configuration like this:
connections' => [
'mysql' => [
'driver' => 'mysql',
'host' => env('DB_HOST', 'localhost'),
'database' => env('DB_DATABASE', 'forge'),
'username' => env('DB_USERNAME', 'forge'),
'password' => env('DB_PASSWORD', ''),
'charset' => 'utf8',
'collation' => 'utf8_unicode_ci',
'prefix' => '',
'strict' => false,
],
],
I've got another exception:
DBALException in DBALException.php line 95:
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
@JacekJagiello I guess this ConnectionFactory is using connection from Laravel and not for Doctrine.
I'm afraid we have no integration with register. =/
I'm running into this road block with using this package with Laravel 5, also.
No one got a fix for this?
Laravel uses mysql to reference the driver and Doctrine requires the value to be pdo_mysql. Somewhere along the line it should map mysql from your laravel config into pdo_mysql before it attempts to create the Doctrine (DBAL) connection.
Still getting this error when I pull dev-master.
You can fix this without changing the code.
In config/database.php use driver mysql
In config/doctrine.php use driver pdo_mysql
config/database.php
'mysql' => [
'driver' => 'mysql',
'host' => env('DB_HOST', 'localhost'),
'database' => env('DB_DATABASE', 'forge'),
'username' => env('DB_USERNAME', 'forge'),
'password' => env('DB_PASSWORD', ''),
'charset' => 'utf8',
'collation' => 'utf8_unicode_ci',
'prefix' => '',
'strict' => false,
],
config/doctrine.php
# Override your laravel values here if desired.
'mysql' => [
'driver' => 'pdo_mysql',
// 'host' => env('DB_HOST', 'localhost'),
// 'dbname' => env('DB_DATABASE', 'forge'),
// 'user' => env('DB_USERNAME', 'forge'),
// 'password' => env('DB_PASSWORD', ''),
// 'prefix' => ''
],
Hello again, In issue #103 I've changed
DB_CONNECTION
tomysql
anddriver
for this connection topdo_mysql
. Howere, now there is some issue when I register new user using default AuthController and Doctrine driver provided by this lib. When I send POST request tolocalhost/auth/register
to register user I got:I tried to debug, this. In ConnectionFactory class there's method
And I found that my
$config['driver']
is set topdo_mysql
as expected, but as we can see there's nopdo_mysql
in switch.How to setup this driver correctly?