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;