Skip to content

Conversation

andrey-helldar
Copy link

@andrey-helldar andrey-helldar commented Sep 6, 2025

Description

I am developing a Laravel application, and JetBrains Junie provides very poor guidance for working with Laravel.

My idea is to connect Laravel Boost to the application being developed and generate guidelines for it.

My steps were as follows:

composer require laravel/boost --dev

php vendor/bin/testbench boost:install

After that, I answered the questions and ended up with three guidelines: boost, foundation, and php.

All guidelines used by the project should be generated:

  • Laravel Boost
  • Laravel Foundation
  • Laravel 12
  • Pest 4
  • Pint

In addition, if you run the boost:install console command with the -n parameter in this project, I get an error:

$ php vendor/bin/testbench boost:install -n

 ██████╗   ██████╗   ██████╗  ███████╗ ████████╗
██╔══██╗ ██╔═══██╗ ██╔═══██╗ ██╔════╝ ╚══██╔══╝
██████╔╝ ██║   ██║ ██║   ██║ ███████╗    ██║
██╔══██╗ ██║   ██║ ██║   ██║ ╚════██║    ██║
██████╔╝ ╚██████╔╝ ╚██████╔╝ ███████║    ██║
╚═════╝   ╚═════╝   ╚═════╝  ╚══════╝    ╚═╝

  ✦ Laravel Boost :: Install :: We Must Ship ✦ 

 Let's give Laravel a Boost


  TypeError 

  array_map(): Argument #2 ($array) must be of type array, null given

  at vendor\laravel\framework\src\Illuminate\Console\Concerns\ConfiguresPrompts.php:279
    275▕ 
    276▕         $answers = $this->components->choice($label, $options, $default, null, true);
    277▕ 
    278▕         if (! array_is_list($options)) {
  ➜ 279▕             $answers = array_map(fn ($value) => $value === (string) (int) $value ? (int) $value : $value, $answers);
    280▕         }
    281▕ 
    282▕         if ($required === false) {
    283▕             return array_is_list($options)

  1   vendor\laravel\framework\src\Illuminate\Console\Concerns\ConfiguresPrompts.php:279

  2   vendor\laravel\framework\src\Illuminate\Console\Concerns\ConfiguresPrompts.php:79
      Illuminate\Console\Command::multiselectFallback("Which code editors do you use to work on Laravel?", ["Claude Code", "Cursor", "PhpStorm", "VS Code"])

Attempts to change behavior

I wanted to override some methods in the Laravel\Boost\Console\InstallCommand class but couldn't do so because they are private.

Proposal

Therefore, I propose replacing private methods with protected ones so that we can work more flexibly with the project when developing packages for Laravel.

For now, I had to copy-paste the Laravel\Boost\Console\InstallCommand class into the project and make the necessary changes (one, two, three). This is very bad and inconvenient, but there was no other way.

In conclusion

Yes, this solution is far from ideal, and yes, in some places it may mislead the AI. But it helps the AI better understand what it’s working with.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant