Tempest PHP IntelliPhense
Tempest is a PHP framework that discovers your code: routes, console commands and scheduled tasks are declared with native PHP attributes — no registration files. This extension makes that workflow seamless in the editor. Features🎨 Syntax highlighting for
|
| Attribute | Snippet |
|---|---|
#[Get] / #[Post] / #[Put] / #[Patch] / #[Delete] |
#[Get(uri: '/path')] |
#[ConsoleCommand] |
#[ConsoleCommand(name: 'app:command', description: '…')] |
#[ConsoleArgument] |
#[ConsoleArgument(description: '…')] |
#[Schedule] |
#[Schedule(Every::MINUTE)] (also imports Every) |
#[Singleton] |
#[Singleton] |
💉 Constructor autowiring hints
Inside __construct(…), the extension suggests Tempest's core services as promoted constructor properties (Console, Database, Router, ViewRenderer, CommandBus, EventBus, Clock, HttpClient, Logger, Container) — pick one and both the promoted property (e.g. private Router $router) and its use import are written for you. Tempest's container autowires the rest.
✂️ Snippets
PHP: tempest:get, tempest:post, tempest:command, tempest:schedule, tempest:migration.
Views: :if, :foreach, x-template, x-slot, x-component.
Contributing & Development
This project uses bun and bundles with esbuild.
bun install # dependencies
bun run typecheck # tsc --noEmit
bun run build:bundle # esbuild → build/extension.js
Local Development Setup
- Open this folder in VS Code.
- Run
bun installandbun run build:bundleonce. - Press F5 (Run Extension) — a new Extension Development Host window opens with the extension loaded.
- In the host window, open a Tempest project (or any folder with PHP files):
- open a
*.view.phpfile → highlighting for:if,:foreach,<x-…>and{{ }}; - in a
.phpfile type#[→ attribute completions; - inside a
__construct(parameter list, trigger suggestions (Ctrl+Space) → autowiring hints.
- open a
Packaging
bunx @vscode/vsce package --no-dependencies
Produces a .vsix you can install via Extensions → … → Install from VSIX.
References
License
MIT © Luiz Marin