Laravel 5.1 : Class 'Doctrine\DBAL\Driver\PDOSqlite\Driver' not found
Trying to follow "laravel 5 fundamental serie", I'm using laravel 5.1 , I'm trying to do a migrate:refresh, I get an error :
Class 'Doctrine\DBAL\Driver\PDOSqlite\Driver' not found in ../vendor/laravel/framework/src/Illuminate/Database/SQLiteConnection.php
[Symfony\Component\Debug\Exception\FatalErrorException] Class 'Doctrine\DBAL\Driver\PDOSqlite\Driver' not found
Doctrine/dbal is already required in my composer.json
"require": {
"php": ">=5.5.9",
"laravel/framework": "5.1.*",
"Doctrine/dbal": "^2.5"
}
So I want to ask what is wrong in my laravel project.
@bobbybouwmann, yes I still getting the same error,
I did a "composer install" and I updated my composer.json making the package in lower case and "composer update".
Oddly enough - I get the same error using sqlite and migrate:refresh - plain migrate works ok. @morad7 if you delete your database file and touch a new one - can you run plain artisan migrate ok?
@bobbybouwmann I've tried ubuntu 15.04 and a CentOS 5.6 box - both can run migrate ok so the base pdo sqlite itself seems fine, just the doctrine dbal things seems unhappy. I only noticed as I was trying to be cheap and see if I could get away with using sqlite rather than mysql on a server to save some ram ;-) That'll teach me to try and save ~2 euro a month.. ;-)
@bobbybouwmann didn't make any difference sadly. Amusingly my vm now runs out of ram running composer update - I think I'll give up on this and just pay out the extra euro and run with mysql ;-)
@morad7 the database.sqlite file (or move it somewhere else) then just touch database.sqlite file again to make an empty one. The :refresh will erase all your data anyway so it's like an awkward version of the same thing ;-)
Whether or not this is related to the issues above, I don't know, but for me it was a dependency issue & simply rerunning composer install set it straight