Skip to content

Commit 30a057f

Browse files
authored
Merge pull request #482 from owenvoke/feature/prompts
feat: add Laravel Prompts
2 parents fa9e822 + 2e8ab53 commit 30a057f

File tree

3 files changed

+28
-26
lines changed

3 files changed

+28
-26
lines changed

composer.json

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -22,18 +22,18 @@
2222
"php": "^8.1",
2323
"ext-json": "*",
2424
"dragonmantank/cron-expression": "^3.3.3",
25-
"illuminate/cache": "^10.13.5",
26-
"illuminate/collections": "^10.13.5",
27-
"illuminate/config": "^10.13.5",
28-
"illuminate/console": "^10.13.5",
29-
"illuminate/container": "^10.13.5",
30-
"illuminate/contracts": "^10.13.5",
31-
"illuminate/events": "^10.13.5",
32-
"illuminate/filesystem": "^10.13.5",
33-
"illuminate/process": "^10.13.5",
34-
"illuminate/support": "^10.13.5",
35-
"illuminate/testing": "^10.13.5",
36-
"laravel-zero/foundation": "^10.12",
25+
"illuminate/cache": "^10.28",
26+
"illuminate/collections": "^10.28",
27+
"illuminate/config": "^10.28",
28+
"illuminate/console": "^10.28",
29+
"illuminate/container": "^10.28",
30+
"illuminate/contracts": "^10.28",
31+
"illuminate/events": "^10.28",
32+
"illuminate/filesystem": "^10.28",
33+
"illuminate/process": "^10.28",
34+
"illuminate/support": "^10.28",
35+
"illuminate/testing": "^10.28",
36+
"laravel-zero/foundation": "^10.28",
3737
"league/flysystem": "^3.15.1",
3838
"nunomaduro/collision": "^6.4.0|^7.8.1",
3939
"nunomaduro/laravel-console-summary": "^1.10.0",
@@ -51,22 +51,22 @@
5151
},
5252
"require-dev": {
5353
"guzzlehttp/guzzle": "^7.7",
54-
"illuminate/bus": "^10.13.5",
55-
"illuminate/database": "^10.13.5",
56-
"illuminate/http": "^10.13.5",
57-
"illuminate/log": "^10.13.5",
58-
"illuminate/queue": "^10.13.5",
59-
"illuminate/redis": "^10.13.5",
60-
"illuminate/view": "^10.13.5",
54+
"illuminate/bus": "^10.28",
55+
"illuminate/database": "^10.28",
56+
"illuminate/http": "^10.28",
57+
"illuminate/log": "^10.28",
58+
"illuminate/queue": "^10.28",
59+
"illuminate/redis": "^10.28",
60+
"illuminate/view": "^10.28",
6161
"laminas/laminas-text": "^2.10",
62-
"laravel-zero/phar-updater": "^1.3",
63-
"laravel/pint": "^1.11",
62+
"laravel-zero/phar-updater": "^1.4",
63+
"laravel/pint": "^1.13.3",
6464
"nunomaduro/laravel-console-dusk": "^1.11",
6565
"nunomaduro/laravel-console-menu": "^3.4",
6666
"nunomaduro/termwind": "^1.15.1",
67-
"pestphp/pest": "^2.13.0",
67+
"pestphp/pest": "^2.22.1",
6868
"pestphp/pest-plugin-laravel": "^2.2",
69-
"phpstan/phpstan": "^1.10.28"
69+
"phpstan/phpstan": "^1.10.38"
7070
},
7171
"autoload": {
7272
"psr-4": {

src/Commands/BuildCommand.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,13 @@
1818
use Symfony\Component\Console\Command\SignalableCommandInterface;
1919
use Symfony\Component\Console\Helper\ProgressBar;
2020
use Symfony\Component\Console\Input\InputInterface;
21-
use Symfony\Component\Console\Output\ConsoleOutputInterface;
2221
use Symfony\Component\Console\Output\NullOutput;
2322
use Symfony\Component\Console\Output\OutputInterface;
2423
use Symfony\Component\Process\Process;
2524
use Throwable;
2625

26+
use function Laravel\Prompts\text;
27+
2728
final class BuildCommand extends Command implements SignalableCommandInterface
2829
{
2930
/**
@@ -174,7 +175,7 @@ private function prepare(): BuildCommand
174175
$config = include $configFile;
175176

176177
$config['env'] = 'production';
177-
$version = $this->option('build-version') ?: $this->ask('Build version?', $config['version']);
178+
$version = $this->option('build-version') ?: text('Build version?', $config['version']);
178179
$config['version'] = $version;
179180

180181
$boxFile = $this->app->basePath('box.json');

src/Commands/RenameCommand.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
use Illuminate\Support\Facades\File;
1717
use Illuminate\Support\Str;
1818

19+
use function Laravel\Prompts\text;
1920
use function sprintf;
2021

2122
final class RenameCommand extends Command
@@ -66,7 +67,7 @@ private function rename(): RenameCommand
6667
private function asksForApplicationName(): string
6768
{
6869
if (empty($name = $this->input->getArgument('name'))) {
69-
$name = $this->ask('What is your application name?');
70+
$name = text('What is your application name?');
7071
}
7172

7273
if (empty($name)) {

0 commit comments

Comments
 (0)