spiral / app

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

Error env calling at database config setup #148

Open dmekhov opened 1 month ago

dmekhov commented 1 month 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