Symfony Captain ⚓
Navigate your Symfony project like a captain navigates the seas.
A VS Code extension that brings powerful navigation features for Symfony developers. Quickly jump between routes, controllers, and Twig templates.
✨ Features
Browse all your Symfony routes in a dedicated sidebar panel:
- View route names and URL paths at a glance
- See associated Twig templates as expandable children
- Filter routes by name, path, controller, or template
- Auto-refresh when controllers change

⚡ Quick Navigation (Ctrl+Shift+P)
Use Symfony Captain: Navigate to instantly jump to any route:
- Fuzzy search across route names, paths, and controllers
- Live preview as you browse results
- Shows template associations inline
🔗 Smart Links in PHP Controllers
Click directly on:
- Template paths in
$this->render('template.html.twig') → opens the Twig file
- Route names in
redirectToRoute('route_name') → jumps to the route definition
🏷️ CodeLens for Twig Templates
See which route(s) render each template directly at the top of your Twig files:
- Single route? Shows
⚙ route_name → Controller.php:line
- Multiple routes? Shows
↗ Used in N routes (click to pick)
🎯 Context-Aware Highlighting
The sidebar automatically highlights routes related to your current file:
- 🟢 Green: Routes that render the current Twig template
- 🔵 Blue: Routes defined in the current controller
📋 Commands
| Command |
Description |
Symfony Captain: Navigate |
Quick-pick route navigation |
Symfony Captain: Go to Route |
Jump to route from Twig template |
Refresh Routes |
Manually refresh the route list |
Filter Routes |
Filter routes in the sidebar |
Clear Filter |
Clear active filter |
⚙️ Requirements
- A Symfony project with routes defined using PHP attributes (
#[Route(...)])
- Controllers in
src/Controller/
- Templates in
templates/
🚀 Getting Started
- Open a Symfony project in VS Code
- Click the Symfony Captain icon in the Activity Bar
- Browse your routes or use
Ctrl+Shift+P → Symfony Captain: Navigate
📝 Supported Route Syntax
#[Route('/users', name: 'user_list')]
public function list(): Response
{
return $this->render('user/list.html.twig');
}
#[Route(path: '/users/{id}', name: 'user_show')]
public function show(int $id): Response
{
return $this->render('user/show.html.twig');
}
💡 Tips
- Use the filter to quickly find routes in large projects
- Hover over routes in the sidebar to see the full file path
- Click on template children to jump directly to the Twig file
📄 License
MIT
Enjoy sailing through your Symfony codebase! ⚓
| |