spiral / app

Spiral Framework Skeleton HTTP Application: Queue, Console, Cycle ORM
https://spiral.dev/
MIT License
194 stars 21 forks source link

Error env calling at database config setup #148

Open dmekhov opened 4 months ago

dmekhov commented 4 months ago

Base scaffold have env function call in app/config/database.php

'driver' => env('DB_CONNECTION', 'sqlite'),
https://github.com/spiral/app/blob/master/app/config/database.php#L30

but it seems like env doesn't working properly at that moment

I've got an error here

php app.php db:list
[Cycle\Database\Exception\ConfigException]
Undefined driver ``
in vendor/cycle/database/src/Config/DatabaseConfig.php:107

if I set

'databases' => [
        'default' => ['driver' => 'sqlite'],
],

everything is ok