Symfony Plugin - Latest Features
Newest features for Symfony development in PhpStorm
2026-03-03
Other Twig Navigation
Use IntelliJ's Find Usages (Alt+F7) on any Twig template to see all references grouped by semantic type: extends, include, embed, import, from, form_theme, controller, and component.
extends:
{% extends 'base.html.twig' %}
include:
{% include 'partials/nav.html.twig' %}
{{ include('partials/nav.html.twig') }}
{{ source('partials/nav.html.twig') }}
embed:
{% embed 'layout.html.twig' %}
{% block content %}Override{% endblock %}
{% endembed %}
import / from:
{% import 'macros.html.twig' as macros %}
{% from 'macros.html.twig' import input as text_input %}
form_theme:
{% form_theme form with 'form/div_layout.html.twig' %}
controller:
return $this->render('home/index.html.twig');
return $this->renderView('home/index.html.twig');
component:
{{ component('Alert', { type: 'success' }) }}
{% component Alert type='success' %}{% endcomponent %}
<twig:Alert type="success"></twig:Alert>
2026-03-01
Completion Twig UX Component
Provides completion for <twig:block> tags inside Symfony UX Twig components. When editing a component usage at the root level, the plugin suggests block names defined in the component template and automatically inserts the full block tag structure.
Block tag completion:
<twig:Alert>
<caret> {# Suggests: <twig:block name="message">, <twig:block name="actions"> #}
</twig:Alert>
2026-03-01
Completion Twig UX Component
Provides completion for block names inside the name="" attribute of <twig:block> tags. The plugin suggests block names defined in the component template.
Block name completion:
<twig:Alert>
<twig:block name="<caret>"> {# Suggests: message, actions #}
</twig:block>
</twig:Alert>
2026-03-01
Lists all variables available in a Twig template with their PHP types and first-level accessible properties. Accepts a template name or a project-relative file path.
Variables are collected from controller render calls, Twig {% types %} tags, and {% @var %} annotations.
variable,type,properties
user,\App\Entity\User,"id,email,name,roles,createdAt"
app,\Symfony\Bridge\Twig\AppVariable,"user,request,session,environment,debug,token,flashes"
products,\App\Entity\Product[],"id,title,price,category,isActive"
2026-03-01
Completion Twig Navigation
Provides class completion for the {% types %} Twig tag, which is used to declare variable types in templates. The completion suggests PHP class names including namespace support.
Supports the optional marker syntax (?:) for nullable types and array notation ([]) for collections. Navigate to class definitions via Ctrl+Click or Cmd+Click.
Basic type declaration:
{% types {
user: '\App\Entity\User',
product: '\App\Entity\Product'
} %}
Optional types and arrays:
{% types {
user?: '\App\Entity\User|null',
items: '\App\Entity\Item[]',
orders?: '\App\Entity\Order[]'
} %}
Completion in action:
{% types { user: 'App\Ent' } %}
{# Completion suggests: Entity, Entity\User, Entity\Product #}
2026-02-28
Lists Symfony UX Twig components and their composition metadata. This MCP tool provides access to all Twig components with their templates, syntax variants, props, and blocks.
Supports partial component name search (case-insensitive).
component_name,template_relative_path,component_tag,twig_component_syntax,component_print_block_syntax,twig_tag_composition_syntax,props,template_blocks
Alert,templates/components/Alert.html.twig, ,{{ component('Alert') }},{{ block('footer') }},{% component 'Alert' %}...{% endcomponent %},message;type,content;footer
Admin:Card,templates/components/Admin/Card.html.twig, ,{{ component('Admin:Card') }},,{% component 'Admin:Card' %}...{% endcomponent %},title,body
2026-02-28
Lists usages of Twig templates across the project. This MCP tool finds all locations where a template is used, including controllers, includes, extends, embeds, and more.
Accepts a partial template name or a project-relative file path (e.g. "templates/home/index.html.twig" resolves to "home/index.html.twig").
Includes Symfony route information: For templates rendered by controllers, the output includes the associated route name and path.
template,controller,twig_include,twig_embed,twig_extends,twig_import,twig_use,twig_form_theme,twig_component,route_name,route_path
partials/nav.html.twig,App\Controller\BaseController::index,templates/layouts/base.html.twig,,,,,,,app_base_index,/
layouts/base.html.twig,,,,,templates/pages/home.html.twig;templates/pages/about.html.twig,,,,
2026-02-27
Reports when Twig block syntax {% block name %} is used inside HTML component syntax <twig:Component>. Inside component contexts, you should use the HTML-compatible <twig:block> tag instead.
Invalid - Twig block syntax inside HTML component:
<twig:Card>
{% block footer %}
Footer content
{% endblock %} <!-- ERROR: Cannot use Twig block syntax inside HTML component -->
</twig:Card>
Valid - Use twig:block HTML syntax:
<twig:Card>
<twig:block name="footer">
Footer content
</twig:block>
</twig:Card>
2026-02-27
Reports when {% from _self import ... %} is used inside a Symfony UX Twig Component. Inside a component context, _self does not refer to the current template, so macro imports via _self will silently fail at runtime.
Invalid - _self does not work inside components:
<twig:Alert>
{% from _self import message_formatter %} <!-- ERROR: _self doesn't work here -->
{{ message_formatter(message) }}
</twig:Alert>
{% macro message_formatter(message) %}
{{ message }}
{% endmacro %}
Valid - Use the full template path:
<twig:Alert>
{% from 'components/alert.html.twig' import message_formatter %}
{{ message_formatter(message) }}
</twig:Alert>
2026-02-27
Linemarker Twig
Navigate from a UX component template to all its usages. Supports all Twig component syntaxes with target resolution.
Function syntax:
{{ component('Alert', { type: 'success' }) }}
Tag syntax:
{% component 'Alert' type='success' %}
Content here
{% endcomponent %}
HTML syntax:
<twig:Alert type="success">
Content here
</twig:Alert>
2026-02-25
Other Twig Annotation
Provides syntax highlighting for @var doc comment annotations in Twig templates. The annotator colors the @var keyword, variable names, and class names to improve readability of type annotations.
{# @var user \App\Entity\User #}
{# @var \App\Entity\Product product #}
{# @var items \App\Entity\Item[] #}
{# Multiple declarations:
@var foo \App\Foo
@var bar \App\Bar
#}
2026-01-17
Generates Symfony service definitions in YAML or XML format for a given PHP class. This MCP tool analyzes a class constructor to identify dependencies and creates service arguments for explicit wiring.
The tool supports both YAML (default) and XML output formats, with options to use the class name as service ID or generate a short ID.
YAML example:
App\Service\EmailService:
arguments: ['@mailer', '@logger']
XML example:
<service id="App\Service\EmailService">
<argument type="service" id="mailer"/>
</service>
2026-01-17
Completion UX Html Twig
Auto-completes Stimulus controller names in HTML data-controller attributes and Twig stimulus_controller() function calls. The completion shows all registered Stimulus controllers from the project, including those from Symfony UX packages.
In HTML, normalized names are provided (e.g., symfony--ux-chartjs--chart). In Twig, both normalized names and original module names (e.g., @symfony/ux-chartjs/chart) are supported. Navigation from controller name to the source JavaScript file is also available.
HTML - data-controller attribute:
<div data-controller="symfony--ux-chartjs--chart">
<canvas data-symfony--ux-chartjs--chart-target="canvas"></canvas>
</div>
Twig - stimulus_controller() function:
{{ stimulus_controller('symfony--ux-chartjs--chart', {
'data': chartData
}) }}