You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Today I tried to update one of my old PHP projects and wanted to have Laravel's Eloquent (and other gimmicks) without entire Laravel, so I used your project. But I hit an issue right away, when I configured it and tried to migrate the first migration.
@DePalmo have you found a fix concerning this issue ?
I am trying to run migrations on a docker database, using pgsql or sqlite, i always get the same error : could not find driver (SQL: select * from information_schema.tables where table_schema = database and table_name = migrations and table_type = 'BASE TABLE')
Today I tried to update one of my old PHP projects and wanted to have Laravel's Eloquent (and other gimmicks) without entire Laravel, so I used your project. But I hit an issue right away, when I configured it and tried to migrate the first migration.
The console commands were keep being rejected that it can't connect to the database set in .env file. After some debugging, I noticed that in https://github.com/Luracast/Laravel-Database/blob/master/bootstrap/autoload.php#L50 you're using
createMutable
, which does not make contents of.env
available, but only as$_ENV
variable.Apparently, the Dotenv has been updated and they are now discouraging of usage
getenv()
directly and we should use$_ENV
: https://github.com/vlucas/phpdotenv#putenv-and-getenvAfter more digging around, I think that the change should be done here: https://github.com/Luracast/Laravel-Database/blob/master/bootstrap/helpers.php#L250 from
$value = getenv($key)
to$value = !empty($_ENV[$key]) ? $_ENV[$key] : $default
.My composer.json (partial):
The text was updated successfully, but these errors were encountered: