A VS Code extension that automatically configures Intelephense to include your Composer vendor directory, providing accurate autocomplete support for Pest testing framework.
How It Works
The extension automatically:
- Searches for
composer.jsonfiles in your workspace (recursively up to 5 levels deep) - Detects corresponding
vendordirectories with Pest installed - Prompts you to configure Intelephense include paths for better autocomplete
- Handles multiple Composer projects by letting you choose which vendor directory to configure
- Standard Laravel/PHP projects:
composer.jsonin project root - WordPress themes:
wp-content/themes/theme-name/composer.json - Laravel packages:
packages/package-name/composer.json - Monorepos: Multiple
composer.jsonfiles in subdirectories - Nested projects: Any Composer project up to 5 levels deep
- Single Composer project: Simple "Configure/Not Now/Don't Ask Again" prompt
- Multiple projects: QuickPick interface to select which vendor directory to configure
- Persistent preferences: Remembers your "Don't Ask Again" choice
- Non-intrusive: Only prompts when vendor directory is found and not already configured
- Smart prioritization: Root-level vendor directories are suggested first
- Manual configuration: Command palette command available for immediate setup after installation
- PHP Intelephense must be installed
- Composer project with Pest installed in vendor directory
Marketplace
- Open the command palette (Ctrl+Shift+P)
- Select
Extensions: Install Extension - Search for
Pest Autocomplete Support - Select the extension and click install
Manual (VSIX)
- Download the VSIX file from repo.
- Open the command palette (Ctrl+Shift+P)
- Select
Extensions: Install from VSIX - Select the .vsix file and click install
If the extension doesn't automatically detect your Composer project, you can manually trigger the configuration:
- Open the command palette (
Ctrl+Shift+P/Cmd+Shift+P) - Type
Pest: Configure Pest Autocomplete Support - Select the command to run the configuration process
If the extension isn't working as expected, check the Output panel:
- Go to View → Output
- Select "Pest Autocomplete Support" from the dropdown
- Look for debug messages about Composer file detection and configuration
- Adds your Composer vendor directory to Intelephense include paths
- Enables accurate autocomplete for Pest functions (
it(),test(),beforeEach(), etc.) - Provides proper type hints and method chaining support
- Uses actual Pest classes from vendor directory (no stub files needed)
