Skip to content

Installation fails when folder structure is not as expected #138

@mathiaswillburger

Description

@mathiaswillburger

Laravel Package Version

1.0.17

Laravel Version

12.24.0

PHP Version

8.4

System Info

Windows 11, VSCode

Description

When following the installation process, the installer terminates if the project folder structure does not match Laravel’s default structure.

For example, in my case, I do not have a tests folder. As a result, the installer exits unexpectedly.

What do you want to install? [mcp_server,ai_guidelines]
  Boost MCP Server (with 15+ tools) ..................................................................................................... mcp_server
  Boost AI Guidelines (for Laravel, Inertia, and more) ............................................................................... ai_guidelines
  Herd MCP Server ......................................................................................................................... herd_mcp
❯ 



   Symfony\Component\Finder\Exception\DirectoryNotFoundException 

  The "C:\xxxxx\tests" directory does not exist.

  at vendor\symfony\finder\Finder.php:646
    642▕             } elseif ($glob = glob($dir, (\defined('GLOB_BRACE') ? \GLOB_BRACE : 0) | \GLOB_ONLYDIR | \GLOB_NOSORT)) {
    643▕                 sort($glob);
    644▕                 $resolvedDirs[] = array_map($this->normalizeDir(...), $glob);
    645▕             } else {
  ➜ 646▕                 throw new DirectoryNotFoundException(\sprintf('The "%s" directory does not exist.', $dir));
    647▕             }
    648▕         }
    649▕
    650▕         $this->dirs = array_merge($this->dirs, ...$resolvedDirs);

  1   vendor\laravel\boost\src\Console\InstallCommand.php:202
      Symfony\Component\Finder\Finder::in("C:\dev\fsi-portal\api\tests")

  2   vendor\laravel\boost\src\Console\InstallCommand.php:121
      Laravel\Boost\Console\InstallCommand::determineTestEnforcement()

Adding an empty "tests" folder for the installation, solved the issue.

Steps To Reproduce

Not tested as the project structure was already set up, but this is probably how to reproduce it:

  • Set up Laravel default project
  • Remove (or rename) the tests folder
  • Run the boost installer

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