-
-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Populate dotenv to config #409
Conversation
if (!env('ADMIN_NAME') || !env('ADMIN_EMAIL') || !env('ADMIN_PASSWORD')) { | ||
if (!config('koel.admin.name') || | ||
!config('koel.admin.email') || | ||
!config('koel.admin.password')) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Expected 1 space after closing parenthesis; found 9
if (app()->environment() !== 'testing') { | ||
$this->command->info('Admin user created. You can (and should) remove the auth details from .env now.'); | ||
if (! app()->runningUnitTests()) { | ||
$this->command->info('Admin user created. You can (and should) remove the auth details from .env now.'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Line indented incorrectly; expected at least 12 spaces, found 8
I will fix it all up. |
'admin' => [ | ||
'name' => env('ADMIN_NAME'), | ||
'email' => env('ADMIN_EMAIL'), | ||
'password' => env('ADMIN_PASSWORD'), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code style.
This looks great! And thank you for your findings – I learned something new today. Can you
|
I'm not that good at this :-( Close this PR and I will make them from scratch. |
I noticed that occasionally I would have an error
of course this make no sense since I have set the DB and password.
So I did some research and found 2 things
Here is a post vlucas/phpdotenv#76 (comment) by @GrahamCampbell about this.
In this PR I created a separate config file
koel.php
for all Koel specific configurations, and I also fix #408.Going forward we can tell users to run
php artisan config:cache
once they finnished setting up Koel, or we could even make part of thekoel:init
command.Note
I think this might in fact be the actual issue with #393.