VOOZH about

URL: https://deepwiki.com/invokable/laravel-boost-phpstorm-copilot/3.1-laravel-boost-integration

⇱ Laravel Boost Integration | invokable/laravel-boost-phpstorm-copilot | DeepWiki


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

Laravel Boost Integration

This page covers how this package plugs into the laravel/boost framework: the Agent base class, the three capability interfaces it implements, and the service provider registration that wires everything together at boot time.

For the runtime MCP server architecture (how boost:mcp is invoked by PhpStorm at runtime), see MCP Server Architecture. For the concrete installation flow across platforms, see MCP Configuration Generation.


The Agent Abstraction

laravel/boost defines an abstract Agent class (`src/PhpStormCopilot.php12) that serves as the base for all agent implementations. Agents are named, discoverable components that can be registered into the Boost framework and then selected during php artisan boost:install.

PhpStormCopilot extends Agent and provides all required method implementations. The two most basic are:

MethodReturn value
name()'phpstorm-copilot' — the machine-readable identifier
displayName()'PhpStorm with GitHub Copilot' — the human-readable label shown during boost:install

The name() return value is the key used when registering and resolving the agent from the framework (see Registration below).

Sources: src/PhpStormCopilot.php19-27


Capability Interfaces

PhpStormCopilot signals which optional Boost capabilities it supports by implementing three interfaces from laravel/boost. Each interface requires a path-returning method that tells the Boost installer where to write the corresponding asset.

Class declaration:

src/PhpStormCopilot.php15-17

class PhpStormCopilot extends Agent implements SupportsGuidelines, SupportsMcp, SupportsSkills

Interface contract summary:

InterfaceRequired methodDefault path
SupportsGuidelinesguidelinesPath(): string.github/instructions/laravel-boost.instructions.md
SupportsSkillsskillsPath(): string.github/skills
SupportsMcpmcpConfigKey(): string'servers'
SupportsMcpmcpConfigPath(): stringOS-dependent (see below)

Each path can be overridden via Laravel config values under boost.agents.phpstorm_copilot.*. The paths for guidelinesPath() and skillsPath() are project-local. The path from mcpConfigPath() is system-wide.

MCP config path resolution (src/PhpStormCopilot.php104-114):

PlatformPath
Darwin / Linux$HOME/.config/github-copilot/intellij/mcp.json
Windows%LOCALAPPDATA%\github-copilot\intellij\mcp.json

Sources: src/PhpStormCopilot.php8-10 src/PhpStormCopilot.php86-114


Interface-to-Code Mapping Diagram

Interface contracts implemented by PhpStormCopilot


Sources: src/PhpStormCopilot.php1-17 src/Concerns/WithWSL.php9-129


Service Provider and Agent Registration

PhpStormCopilotServiceProvider is a standard Laravel ServiceProvider. Its boot() method calls the single line that registers the agent with the Boost framework:

src/PhpStormCopilotServiceProvider.php17-20


This call binds the string key 'phpstorm-copilot' to the PhpStormCopilot class inside Boost's internal agent registry. Once registered, Boost's boost:install and boost:update commands can discover and instantiate the agent.

The provider is loaded automatically by Laravel's package auto-discovery mechanism. The entry in composer.json that enables this is:

composer.json47-52


No manual registration in config/app.php is required. When a developer runs composer require revolution/laravel-boost-phpstorm-copilot, Laravel automatically registers the provider and thus the agent on the next request or CLI invocation.

Sources: src/PhpStormCopilotServiceProvider.php1-21 composer.json47-52


Boot-Time Registration Flow Diagram

How PhpStormCopilot becomes available to boost:install


Sources: src/PhpStormCopilotServiceProvider.php17-20 composer.json47-52 src/PhpStormCopilot.php19-27


useAbsolutePathForMcp

PhpStormCopilot overrides useAbsolutePathForMcp() to return true (src/PhpStormCopilot.php29-31). This signals to the Boost base class that when building the MCP server entry, the PHP binary path and artisan path must be resolved to absolute filesystem paths rather than relative ones.

This is required because mcp.json is a system-wide file (not project-local), and the GitHub Copilot plugin in PhpStorm spawns the MCP subprocess from an unrelated working directory. Relative paths would fail to resolve.

Sources: src/PhpStormCopilot.php29-31


Summary Table

ComponentFileRole
Agent (abstract)laravel/boost (dependency)Base class; defines the installation lifecycle
SupportsGuidelineslaravel/boost (dependency)Interface: declares guidelinesPath()
SupportsMcplaravel/boost (dependency)Interface: declares mcpConfigKey(), mcpConfigPath()
SupportsSkillslaravel/boost (dependency)Interface: declares skillsPath()
PhpStormCopilotsrc/PhpStormCopilot.phpConcrete agent implementation
WithWSLsrc/Concerns/WithWSL.phpTrait: splits out WSL-specific installation logic
PhpStormCopilotServiceProvidersrc/PhpStormCopilotServiceProvider.phpCalls Boost::registerAgent() during boot()
Boost::registerAgent()laravel/boost (dependency)Accepts and stores the agent class binding