VOOZH about

URL: https://deepwiki.com/invokable/laravel-boost-phpstorm-copilot/5.2-windows-native-support

⇱ Windows Native Support | invokable/laravel-boost-phpstorm-copilot | DeepWiki


Loading...
Last indexed: 28 February 2026 (57ef88)
Menu

Windows Native Support

This page covers the Windows-native execution path of PhpStormCopilot: how the package detects a Windows environment, where it writes mcp.json, and how mcpConfigPath() constructs the Windows-specific file path. This page applies only when both PHP and PhpStorm run directly on Windows — no WSL layer is involved. For the WSL pipeline (PHP inside WSL, PhpStorm on Windows), see WSL Support. For macOS and Linux, see macOS and Linux Support.


Detection on Windows

When boost:install runs on Windows, the laravel/boost framework calls systemDetectionConfig(Platform::Windows) on the PhpStormCopilot agent to determine whether this agent is applicable to the current system.

Windows detection paths (src/PhpStormCopilot.php58-65):

PathIndicates
%LOCALAPPDATA%\github-copilot\intellijGitHub Copilot plugin data directory — strongest signal
%ProgramFiles%\JetBrains\PhpStorm*System-wide PhpStorm installation
%LOCALAPPDATA%\JetBrains\Toolbox\apps\PhpStorm\ch-*JetBrains Toolbox installation
%LOCALAPPDATA%\Programs\PhpStormUser-level PhpStorm installation

The laravel/boost framework expands the %LOCALAPPDATA% and %ProgramFiles% environment variable tokens before testing these paths on disk. If any path exists, the agent is treated as installed and selectable.

Detection flow diagram:


Sources: src/PhpStormCopilot.php39-67


mcp.json Write Location

On Windows native, the MCP configuration file is written to:

%LOCALAPPDATA%\github-copilot\intellij\mcp.json

For a default Windows installation with username Alice, this expands to:

C:\Users\Alice\AppData\Local\github-copilot\intellij\mcp.json

This path is returned by mcpConfigPath() in PhpStormCopilot (src/PhpStormCopilot.php104-114):

Platform::Windows → '%LOCALAPPDATA%\\github-copilot\\intellij\\mcp.json'

The %LOCALAPPDATA% token is left as a literal string in the return value; path expansion is handled by the laravel/boost parent class (Agent::installFileMcp) when it performs the actual file write on Windows.

Note that on Darwin and Linux, mcpConfigPath() uses getenv('HOME') to construct the path at runtime, producing a fully resolved string. On Windows, the %LOCALAPPDATA% token is passed through because getenv('LOCALAPPDATA') returns an absolute path only within a native Windows PHP process, and the parent class handles environment variable expansion in the path string.

Sources: src/PhpStormCopilot.php104-114


Installation Flow

When installFileMcp is called on Windows native (no WSL, no Testbench), the logic is straightforward:

installFileMcp dispatch for Windows native (src/PhpStormCopilot.php119-132):


The key distinction from WSL: on Windows native, no powershell.exe subprocess is used to write the file. The parent::installFileMcp (from laravel/boost's Agent base class) writes the file directly using PHP's standard file I/O.

Sources: src/PhpStormCopilot.php119-132 src/PhpStormCopilot.php141-162


Resulting mcp.json Structure

After a successful boost:install --mcp on Windows native, the file at %LOCALAPPDATA%\github-copilot\intellij\mcp.json will contain:


Key points:

  • mcpConfigKey() returns "servers" — this is the top-level key (src/PhpStormCopilot.php99-101).
  • useAbsolutePathForMcp() returns true (src/PhpStormCopilot.php29-32), so the laravel/boost framework substitutes absolute Windows paths for both the PHP binary and the artisan file.
  • The file is system-wide, not per-project. The absolute paths bake in the current project location. Re-run boost:install when switching projects. See Multi-Project Workflow for details.

Class and Method Map


Sources: src/PhpStormCopilot.php1-187 src/Concerns/WithWSL.php11-14


Platform Comparison Summary

AspectWindows NativeWSLmacOS / Linux
Platform::current()Platform::WindowsPlatform::LinuxPlatform::Darwin / Platform::Linux
isWSL()falsetruefalse
mcp.json location%LOCALAPPDATA%\github-copilot\intellij\mcp.jsonWindows side via PowerShell~/.config/github-copilot/intellij/mcp.json
File write mechanismparent::installFileMcp (PHP direct I/O)installMcpViaWsl via powershell.exeparent::installFileMcp (PHP direct I/O)
HOME env usedNoNoYes
LOCALAPPDATA env usedYes (token in path string)Yes (via wslvar LOCALAPPDATA)No

Sources: src/PhpStormCopilot.php104-114 src/Concerns/WithWSL.php16-76 README.md122-124