Open geekish opened 8 years ago
Never mind, getting the same error now whether I use my own DBAL connection or not.
I still would like to be able to inject an instance of Connection into SqlRepository instead of PDO, for when I get this working. :sweat_smile:
I'm trying to use this library in a project where I was previously using Doctrine's DBAL with an SQLite database. When I attempt to write to the database I get:
I was able to read from and write to it just fine previously, so I did some digging.
When creating my own Doctrine Connection, I must use the following code (with an actual path): DriverManager::getConnection([ 'path' => /path/to/database, 'driver' => 'pdo_sqlite' ]);
...while the SQL repository creates it via: DriverManager::getConnection(['pdo' => $pdo])
It seems SQLite requires it to be done a bit differently. Perhaps it would be best to allow the user to inject their own DBAL connection?