@@ -249,11 +249,6 @@ protected function defaultBranch()
249
249
*/
250
250
protected function configureDefaultDatabaseConnection (string $ directory , string $ database , string $ name , bool $ migrate )
251
251
{
252
- // MariaDB configuration only exists as of Laravel 11...
253
- if ($ database === 'mariadb ' && ! $ this ->usingLaravel11OrNewer ($ directory )) {
254
- $ database = 'mysql ' ;
255
- }
256
-
257
252
$ this ->pregReplaceInFile (
258
253
'/DB_CONNECTION=.*/ ' ,
259
254
'DB_CONNECTION= ' .$ database ,
@@ -320,13 +315,13 @@ protected function configureDefaultDatabaseConnection(string $directory, string
320
315
* @param string $directory
321
316
* @return bool
322
317
*/
323
- public function usingLaravel11OrNewer ( string $ directory ): bool
318
+ public function usingLaravelVersionOrNewer ( int $ usingVersion , string $ directory ): bool
324
319
{
325
320
$ version = json_decode (file_get_contents ($ directory .'/composer.json ' ), true )['require ' ]['laravel/framework ' ];
326
321
$ version = str_replace ('^ ' , '' , $ version );
327
322
$ version = explode ('. ' , $ version )[0 ];
328
323
329
- return $ version >= 11 ;
324
+ return $ version >= $ usingVersion ;
330
325
}
331
326
332
327
/**
@@ -452,8 +447,7 @@ protected function installJetstream(string $directory, InputInterface $input, Ou
452
447
*/
453
448
protected function promptForDatabaseOptions (string $ directory , InputInterface $ input )
454
449
{
455
- // Laravel 11.x appliations use SQLite as default...
456
- $ defaultDatabase = $ this ->usingLaravel11OrNewer ($ directory ) ? 'sqlite ' : 'mysql ' ;
450
+ $ defaultDatabase = 'sqlite ' ;
457
451
458
452
if ($ input ->isInteractive ()) {
459
453
$ database = select (
@@ -468,7 +462,7 @@ protected function promptForDatabaseOptions(string $directory, InputInterface $i
468
462
default: $ defaultDatabase
469
463
);
470
464
471
- if ($ this -> usingLaravel11OrNewer ( $ directory ) && $ database !== $ defaultDatabase ) {
465
+ if ($ database !== $ defaultDatabase ) {
472
466
$ migrate = confirm (label: 'Default database updated. Would you like to run the default database migrations? ' , default: true );
473
467
}
474
468
}
0 commit comments