diff --git a/composer.json b/composer.json index c0e4f051c5..b52eaeb8e3 100644 --- a/composer.json +++ b/composer.json @@ -45,7 +45,7 @@ "dflydev/dot-access-data": "^3.0.2", "grasmash/yaml-cli": "^3.1", "guzzlehttp/guzzle": "^7.0", - "laravel/prompts": "^0.1.15", + "laravel/prompts": "^0.1.21", "league/container": "^4.2", "psy/psysh": "~0.11", "symfony/event-dispatcher": "^6 || ^7", diff --git a/composer.lock b/composer.lock index 1089b9d72c..c05a5927cb 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "b7b26dc9a1b4cbbf1d97d50d2d2c8f32", + "content-hash": "228af8b8fbfc79828216415765c7d90d", "packages": [ { "name": "chi-teck/drupal-code-generator", @@ -1173,31 +1173,31 @@ }, { "name": "illuminate/collections", - "version": "v10.0.0", + "version": "v11.6.0", "source": { "type": "git", "url": "https://github.com/illuminate/collections.git", - "reference": "952ee463d17eb4dd3cd29516a2228b290c94e648" + "reference": "19c6554c7eba0efabc3f8aa4c434815b7f6b4b7d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/illuminate/collections/zipball/952ee463d17eb4dd3cd29516a2228b290c94e648", - "reference": "952ee463d17eb4dd3cd29516a2228b290c94e648", + "url": "https://api.github.com/repos/illuminate/collections/zipball/19c6554c7eba0efabc3f8aa4c434815b7f6b4b7d", + "reference": "19c6554c7eba0efabc3f8aa4c434815b7f6b4b7d", "shasum": "" }, "require": { - "illuminate/conditionable": "^10.0", - "illuminate/contracts": "^10.0", - "illuminate/macroable": "^10.0", - "php": "^8.1" + "illuminate/conditionable": "^11.0", + "illuminate/contracts": "^11.0", + "illuminate/macroable": "^11.0", + "php": "^8.2" }, "suggest": { - "symfony/var-dumper": "Required to use the dump method (^6.2)." + "symfony/var-dumper": "Required to use the dump method (^7.0)." }, "type": "library", "extra": { "branch-alias": { - "dev-master": "10.x-dev" + "dev-master": "11.x-dev" } }, "autoload": { @@ -1224,20 +1224,20 @@ "issues": "https://github.com/laravel/framework/issues", "source": "https://github.com/laravel/framework" }, - "time": "2023-02-14T15:00:37+00:00" + "time": "2024-04-15T15:26:05+00:00" }, { "name": "illuminate/conditionable", - "version": "v10.0.0", + "version": "v11.6.0", "source": { "type": "git", "url": "https://github.com/illuminate/conditionable.git", - "reference": "d0958e4741fc9d6f516a552060fd1b829a85e009" + "reference": "8a558fec063b6a63da1c3af1d219c0f998edffeb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/illuminate/conditionable/zipball/d0958e4741fc9d6f516a552060fd1b829a85e009", - "reference": "d0958e4741fc9d6f516a552060fd1b829a85e009", + "url": "https://api.github.com/repos/illuminate/conditionable/zipball/8a558fec063b6a63da1c3af1d219c0f998edffeb", + "reference": "8a558fec063b6a63da1c3af1d219c0f998edffeb", "shasum": "" }, "require": { @@ -1246,7 +1246,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "10.x-dev" + "dev-master": "11.x-dev" } }, "autoload": { @@ -1270,31 +1270,31 @@ "issues": "https://github.com/laravel/framework/issues", "source": "https://github.com/laravel/framework" }, - "time": "2023-02-03T08:06:17+00:00" + "time": "2024-04-04T17:36:49+00:00" }, { "name": "illuminate/contracts", - "version": "v10.0.0", + "version": "v11.6.0", "source": { "type": "git", "url": "https://github.com/illuminate/contracts.git", - "reference": "84f1da424ab9596a422ce118abd05667b0069624" + "reference": "8782f75e80ab3e6036842d24dbeead34a16f3a79" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/illuminate/contracts/zipball/84f1da424ab9596a422ce118abd05667b0069624", - "reference": "84f1da424ab9596a422ce118abd05667b0069624", + "url": "https://api.github.com/repos/illuminate/contracts/zipball/8782f75e80ab3e6036842d24dbeead34a16f3a79", + "reference": "8782f75e80ab3e6036842d24dbeead34a16f3a79", "shasum": "" }, "require": { - "php": "^8.1", + "php": "^8.2", "psr/container": "^1.1.1|^2.0.1", "psr/simple-cache": "^1.0|^2.0|^3.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "10.x-dev" + "dev-master": "11.x-dev" } }, "autoload": { @@ -1318,29 +1318,29 @@ "issues": "https://github.com/laravel/framework/issues", "source": "https://github.com/laravel/framework" }, - "time": "2023-02-14T15:00:37+00:00" + "time": "2024-04-17T14:09:55+00:00" }, { "name": "illuminate/macroable", - "version": "v10.0.0", + "version": "v11.6.0", "source": { "type": "git", "url": "https://github.com/illuminate/macroable.git", - "reference": "7686fe9dba1e236e6f695a148b551264b9fd479e" + "reference": "e1be58f9b2af73f242dc6a9add1f376b3ec89eef" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/illuminate/macroable/zipball/7686fe9dba1e236e6f695a148b551264b9fd479e", - "reference": "7686fe9dba1e236e6f695a148b551264b9fd479e", + "url": "https://api.github.com/repos/illuminate/macroable/zipball/e1be58f9b2af73f242dc6a9add1f376b3ec89eef", + "reference": "e1be58f9b2af73f242dc6a9add1f376b3ec89eef", "shasum": "" }, "require": { - "php": "^8.1" + "php": "^8.2" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "10.x-dev" + "dev-master": "11.x-dev" } }, "autoload": { @@ -1364,20 +1364,20 @@ "issues": "https://github.com/laravel/framework/issues", "source": "https://github.com/laravel/framework" }, - "time": "2023-01-30T23:18:36+00:00" + "time": "2023-06-08T14:08:27+00:00" }, { "name": "laravel/prompts", - "version": "v0.1.15", + "version": "v0.1.21", "source": { "type": "git", "url": "https://github.com/laravel/prompts.git", - "reference": "d814a27514d99b03c85aa42b22cfd946568636c1" + "reference": "23ea808e8a145653e0ab29e30d4385e49f40a920" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/prompts/zipball/d814a27514d99b03c85aa42b22cfd946568636c1", - "reference": "d814a27514d99b03c85aa42b22cfd946568636c1", + "url": "https://api.github.com/repos/laravel/prompts/zipball/23ea808e8a145653e0ab29e30d4385e49f40a920", + "reference": "23ea808e8a145653e0ab29e30d4385e49f40a920", "shasum": "" }, "require": { @@ -1417,11 +1417,12 @@ "license": [ "MIT" ], + "description": "Add beautiful and user-friendly forms to your command-line applications.", "support": { "issues": "https://github.com/laravel/prompts/issues", - "source": "https://github.com/laravel/prompts/tree/v0.1.15" + "source": "https://github.com/laravel/prompts/tree/v0.1.21" }, - "time": "2023-12-29T22:37:42+00:00" + "time": "2024-04-30T12:46:16+00:00" }, { "name": "league/container", @@ -2031,25 +2032,25 @@ }, { "name": "psr/simple-cache", - "version": "1.0.0", + "version": "3.0.0", "source": { "type": "git", "url": "https://github.com/php-fig/simple-cache.git", - "reference": "753fa598e8f3b9966c886fe13f370baa45ef0e24" + "reference": "764e0b3939f5ca87cb904f570ef9be2d78a07865" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/simple-cache/zipball/753fa598e8f3b9966c886fe13f370baa45ef0e24", - "reference": "753fa598e8f3b9966c886fe13f370baa45ef0e24", + "url": "https://api.github.com/repos/php-fig/simple-cache/zipball/764e0b3939f5ca87cb904f570ef9be2d78a07865", + "reference": "764e0b3939f5ca87cb904f570ef9be2d78a07865", "shasum": "" }, "require": { - "php": ">=5.3.0" + "php": ">=8.0.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0.x-dev" + "dev-master": "3.0.x-dev" } }, "autoload": { @@ -2064,7 +2065,7 @@ "authors": [ { "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" + "homepage": "https://www.php-fig.org/" } ], "description": "Common interfaces for simple caching", @@ -2076,9 +2077,9 @@ "simple-cache" ], "support": { - "source": "https://github.com/php-fig/simple-cache/tree/1.0.0" + "source": "https://github.com/php-fig/simple-cache/tree/3.0.0" }, - "time": "2017-01-02T13:31:39+00:00" + "time": "2021-10-29T13:26:27+00:00" }, { "name": "psy/psysh", diff --git a/src/Commands/ConfiguresPrompts.php b/src/Commands/ConfiguresPrompts.php index 7cdd5dc547..47db1b3052 100644 --- a/src/Commands/ConfiguresPrompts.php +++ b/src/Commands/ConfiguresPrompts.php @@ -15,6 +15,7 @@ use Laravel\Prompts\SearchPrompt; use Laravel\Prompts\SelectPrompt; use Laravel\Prompts\SuggestPrompt; +use Laravel\Prompts\TextareaPrompt; use Laravel\Prompts\TextPrompt; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Style\SymfonyStyle; @@ -45,6 +46,12 @@ protected function configurePrompts(InputInterface $input) $prompt->validate )); + TextareaPrompt::fallbackUsing(fn(TextareaPrompt $prompt) => $this->promptUntilValid( + fn() => (new SymfonyStyle($this->input, $this->output))->ask($prompt->label, $prompt->default ?: null) ?? '', // multiline: true + $prompt->required, + $prompt->validate + )); + PasswordPrompt::fallbackUsing(fn (PasswordPrompt $prompt) => $this->promptUntilValid( fn() => (new SymfonyStyle($this->input, $this->output))->askHidden($prompt->label) ?? '', $prompt->required,