installer icon indicating copy to clipboard operation
installer copied to clipboard

Laravel 12 : The database= option doesn't seem to work as expected

Open happytodev opened this issue 10 months ago • 1 comments

Installer Version

5.12.0

Description

When I launch the following :

laravel new l12pgsql --database=pgsql --livewire

or the following

laravel new l12mysql --database=mysql --livewire

The Laravel installer installs sqlite.

DB_CONNECTION=sqlite
# DB_HOST=127.0.0.1
# DB_PORT=3306
# DB_DATABASE=laravel
# DB_USERNAME=root
# DB_PASSWORD=

Maybe I'm wrong, but it sounds like a bug for me.

Steps To Reproduce

Just install a new laravel app with following command :

laravel new l12pgsql --database=pgsql --livewire

or the following

laravel new l12mysql --database=mysql --livewire

happytodev avatar Feb 27 '25 17:02 happytodev

Looks like this is on purpose https://github.com/laravel/installer/blob/61db11d1f05d5496d0ed8a34fca792bdc16edec0/src/NewCommand.php#L507-L512

But this is quite unexpected behaviour

MrYamous avatar Feb 28 '25 05:02 MrYamous

https://github.com/laravel/installer/pull/422 fixed it

mathiasgrimm avatar Aug 03 '25 16:08 mathiasgrimm