From 8bfec42db3011516ab14cb3723a0573f5d8b4f70 Mon Sep 17 00:00:00 2001 From: Mior Muhammad Zaki Date: Thu, 19 Oct 2023 06:36:40 +0800 Subject: [PATCH] wip Signed-off-by: Mior Muhammad Zaki --- src/Console/DevToolCommand.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/Console/DevToolCommand.php b/src/Console/DevToolCommand.php index 2954f93..821cfa9 100644 --- a/src/Console/DevToolCommand.php +++ b/src/Console/DevToolCommand.php @@ -8,6 +8,8 @@ use Orchestra\Testbench\Foundation\Console\Actions\GeneratesFile; use Symfony\Component\Console\Attribute\AsCommand; +use function Laravel\Prompts\select; +use function Orchestra\Testbench\laravel_version_compare; use function Orchestra\Testbench\package_path; #[AsCommand(name: 'workbench:devtool', description: 'Configure Workbench for package development')] @@ -80,10 +82,9 @@ protected function copyTestbenchDotEnvFile(Filesystem $filesystem, string $worki return; } - $choice = $this->components->choice( - "Export '.env' file as?", - $choices, - ); + $choice = laravel_version_compare('10.17', '>=') + ? select("Export '.env' file as?", $choices) + : $this->components->choice("Export '.env' file as?", $choices); if ($choice === 'Skip exporting .env') { return;