Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>Tempest PHP IntelliPhenseNew to Visual Studio Code? Get it now.
Tempest PHP IntelliPhense

Tempest PHP IntelliPhense

Luiz Marin

|
2 installs
| (0) | Free
The Tempest developer's right hand: syntax highlighting for .view.php templates, smart completions for Discovery attributes (#[Get], #[ConsoleCommand], #[Schedule]…) and constructor autowiring hints.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Tempest PHP IntelliPhense

The Tempest developer's right hand — first-class support for the framework's Discovery ecosystem (attributes) and Views inside VS Code.

CI License: MIT

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 .view.php

Registers the Tempest View language for *.view.php files with a dedicated TextMate grammar:

  • Control-flow directives — :if, :elseif, :else, :isset, :foreach, :forelse, :as, :apply are highlighted as keywords, and their values are highlighted as embedded PHP.
  • Expression attributes — any :attribute="…" binding (e.g. :value="$value", :is="$name") gets PHP highlighting inside the quotes.
  • View components — <x-button />, <x-slot name="…" />, <x-template>, <x-component :is="…" /> are colored as component tags, distinct from plain HTML.
  • Interpolation — {{ $escaped }} and {!! $raw !!} are embedded PHP expressions.
  • Plain HTML and <?php … ?> blocks keep their regular highlighting.
<x-base :title="$this->post->title">
    <ul>
        <li :foreach="$this->reports as $report">{{ $report->title }}</li>
        <li :forelse>There is no report.</li>
    </ul>
    <x-button :label="$cta" />
</x-base>

⚡ Smart completions for Discovery attributes

Type #[ in any PHP file and get Tempest's native attributes with ready-to-fill snippets, docs, and the matching use statement inserted automatically:

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

  1. Open this folder in VS Code.
  2. Run bun install and bun run build:bundle once.
  3. Press F5 (Run Extension) — a new Extension Development Host window opens with the extension loaded.
  4. In the host window, open a Tempest project (or any folder with PHP files):
    • open a *.view.php file → highlighting for :if, :foreach, <x-…> and {{ }};
    • in a .php file type #[ → attribute completions;
    • inside a __construct( parameter list, trigger suggestions (Ctrl+Space) → autowiring hints.

Packaging

bunx @vscode/vsce package --no-dependencies

Produces a .vsix you can install via Extensions → … → Install from VSIX.

References

  • Tempest framework
  • Views · Routing · Console commands
  • tempest/highlight

License

MIT © Luiz Marin

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft