Skip to content

Type error when running repo:config #175

Description

@edgrosvenor

After a fresh installation of the Cloud CLI, running cloud repo:config results in the following error:

Laravel\Prompts\select(): Argument #2 ($options) must be of type Illuminate\Support\Collection|array, Illuminate\Support\LazyCollection given, called in /Users/ed/cloud-cli/app/Commands/RepoConfig.php on line 99

  at /Users/ed/cloud-cli/vendor/laravel/prompts/src/helpers.php:78
     74▕      * @param  true|string  $required
     75▕      */
     76▕     function select(
     77▕         string $label,
  ➜  78▕         array|Collection $options,
     79▕         int|string|null $default = null,
     80▕         int $scroll = 5,
     81▕         mixed $validate = null,
     82▕         string $hint = '',

  1   /Users/ed/cloud-cli/app/Commands/RepoConfig.php:99

  2   /Users/ed/cloud-cli/app/Commands/RepoConfig.php:51
      App\Commands\RepoConfig::selectApplication()

The fix is easy, but I'm not sure whether you'd prefer to loosen the types accepted in Prompts or cast to an already accepted type here. So rather than guessing, I'll just open an issue rather than a PR.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions