8000 Added better info during composer require process · whitecube/laravel-preset@be3df30 · GitHub
[go: up one dir, main page]

Skip to content

Commit be3df30

Browse files
committed
Added better info during composer require process
1 parent f7ec0cb commit be3df30

File tree

2 files changed

+17
-4
lines changed

2 files changed

+17
-4
lines changed

src/Composer.php

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,16 +17,21 @@ public static function install(UiCommand $command)
1717

1818
static::installProductionPackages($command);
1919
static::installDevelopmentPackages($command);
20+
static::installTestingPackages($command);
2021
static::copyStub();
2122
}
2223

23-
public static function installProductionPackages()
24+
public static function installProductionPackages(UiCommand $command)
2425
{
26+
$command->info('Installing the following "require" packages:');
27+
2528
$packages = [
2629
'spatie/laravel-log-dumper',
2730
'whitecube/laravel-sluggable'
2831
];
2932

33+
$command->info(implode(', ', $packages));
34+
3035
static::$composer->run([
3136
'require',
3237
...$packages,
@@ -35,22 +40,30 @@ public static function installProductionPackages()
3540
]);
3641
}
3742

38-
public static function installDevelopmentPackages()
43+
public static function installDevelopmentPackages(UiCommand $command)
3944
{
40-
// Install regular dev packages:
45+
$command->info('Installing the following "require-dev" packages:');
46+
4147
$packages = [
4248
'barryvdh/laravel-debugbar',
4349
'laravel/pint',
4450
'spatie/laravel-ray',
4551
];
4652

53+
$command->info(implode(', ', $packages));
54+
4755
static::$composer->run([
4856
'require',
4957
...$packages,
5058
'--dev',
5159
'--sort-packages',
5260
'--no-interaction'
5361
]);
62+
}
63+
64+
public static function installTestingPackages(UiCommand $command)
65+
{
66+
$command->info('Installing Testing Framework "PestPHP" and its Laravel plugin...');
5467

5568
// Pest requires phpunit/phpunit to be removed.
5669
// We'll removed both from the `require` and `require-dev` sections:

src/Pest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ class Pest
88
{
99
public static functio 56A8 n install(UiCommand $command)
1010
{
11-
$command->info('Preparing Pest...');
11+
$command->info('Initializing Pest into the project...');
1212

1313
shell_exec('PEST_NO_SUPPORT=true ./vendor/bin/pest --init');
1414
}

0 commit comments

Comments
 (0)
0