Symfony Plugin - Latest Features
Newest features for Symfony development in PhpStorm
2026-11-13
Reports a weak warning for parameters that match no argument of an ICU message in any locale. Covers trans(), TranslatableMessage, t() and HtmlTranslator::trans().
Checks messages from +intl-icu catalogs when the key and domain resolve statically and the ICU message is valid.
translations/notifications+intl-icu.en.yaml:
items: '{total, number} items'
Unknown parameter:
$translator->trans('items', ['unknown' => 3], 'notifications');
Use an argument declared in the message:
$translator->trans('items', ['total' => 3], 'notifications');
2026-11-13
Other PHP Twig Yaml Translation Find Usages
Find Usages on a translation key in a YAML, PHP or XLIFF catalog includes matching PHP and Twig calls, form options and constraint messages.
Matches the translation domain, including Twig default domains and the base domain of +intl-icu catalogs.
Find Usages on product.title in translations/messages.en.yaml:
product.title: 'Product'
Matching Twig usage:
{{ 'product.title'|trans }}
Matching PHP and form usages:
$translator->trans('product.title');
$builder->add('title', options: ['label' => 'product.title']);
2026-11-13
Completion PHP Twig Translation
Completes argument names from +intl-icu messages in PHP and Twig, including unquoted Twig keys. The popup shows argument types such as number, date and string, plus the alternatives of select arguments.
Supports trans, transchoice, trans_html, PHP trans(), TranslatableMessage and t().
translations/notifications+intl-icu.en.yaml:
items: '{total, number} items'
invitation: '{gender, select, female {She} male {He} other {They}} invited {name}'
Argument names and select information in Twig:
{{ 'items'|trans({total: 3}, 'notifications') }}
{{ 'invitation'|trans({gender: 'female', name: user.name}, 'notifications') }}
ICU parameters in PHP:
$translator->trans('items', ['total' => 3], 'notifications');
new \Symfony\Component\Translation\TranslatableMessage(
'items', ['total' => 3], 'notifications'
);
2026-11-13
Reports a weak warning for parameters passed to trans, transchoice or trans_html that match no argument of the ICU message in any locale.
Checks messages from +intl-icu catalogs when the key and domain resolve statically and the ICU message is valid.
translations/notifications+intl-icu.en.yaml:
items: '{total, number} items'
Unknown parameter:
{{ 'items'|trans({unknown: 3}, 'notifications') }}
Use an argument declared in the message:
{{ 'items'|trans({total: 3}, 'notifications') }}
2026-11-12
Completion PHP Twig Form Doctrine
Resolves form field types from PHP property types and Doctrine mappings when no explicit form type is provided. The inferred type powers option completion, navigation and Twig form field resolution.
Attribute field: IntegerType inferred from ?int:
use Symfony\Component\Form\Attribute\AsFormType;
use Symfony\Component\Form\Attribute\FormField;
#[AsFormType]
class EventData
{
#[FormField(options: ['grouping' => true])]
public ?int $capacity = null;
}
Builder field using the data class property:
// configureOptions()
$resolver->setDefaults(['data_class' => EventData::class]);
// buildForm(): IntegerType options are available without an explicit type.
$builder->add('capacity', options: ['grouping' => true]);
2026-11-12
Completion PHP Twig Translation HTML Navigation
Completes translation keys, domains, HTML tag names and message parameters in Twig trans_html and PHP HtmlTranslator::trans(), with navigation to the translation.
translations/auth+intl-icu.en.yaml:
auth_prompt: 'Hello {name}! <signin_link>Sign in</signin_link>'
Twig HTML translation:
{{ 'auth_prompt'|trans_html(
tags: {signin_link: {tag: 'a'}},
arguments: {name: user.name},
domain: 'auth'
) }}
PHP HtmlTranslator:
/** @var \Symfony\Component\Translation\HtmlTranslator $translator */
$translator->trans(
id: 'auth_prompt',
tags: ['signin_link' => ['tag' => 'a']],
parameters: ['name' => 'Daniel'],
domain: 'auth',
);
2026-11-11
Linemarker Twig Yaml PHP UX Css
Shows gutter color swatches for symfony/ux-css color tokens in Twig and for color definitions and references in YAML or PHP configuration.
Color definitions and references:
ux_css:
tokens:
colors:
brand: '#2563eb'
semantic_tokens:
colors:
primary: '{colors.brand}'
Color preview in Twig:
{{ css({color: 'primary'}) }}
2026-11-11
Navigation Twig Yaml PHP UX Css
Navigates from tokens in Twig css() calls to their declarations in YAML or PHP ux_css configuration, or the bundle's default Panda tokens.
config/packages/ux_css.yaml:
ux_css:
tokens:
colors:
brand: '#2563eb'
semantic_tokens:
colors:
primary: '{colors.brand}'
Navigate from primary to its configuration:
{{ css({color: 'primary'}) }}
2026-10-28
Reports literal ASC, DESC and null sort directions in orderBy() and addOrderBy() when the installed Doctrine ORM version deprecates them.
The quick-fix replaces the direction with SortDirection::Ascending or SortDirection::Descending.
Deprecated sort directions:
$qb->orderBy('p.name', 'ASC');
$qb->addOrderBy('p.createdAt', 'DESC');
$qb->orderBy('p.id', null);
After applying the quick-fix:
$qb->orderBy('p.name', \SortDirection::Ascending);
$qb->addOrderBy('p.createdAt', \SortDirection::Descending);
$qb->orderBy('p.id', \SortDirection::Ascending);
2026-10-27
Completion Yaml PHP Enum Navigation
Completes !php/enum, enum class names and cases in YAML configuration. Navigate from an enum reference to its PHP declaration.
PHP enum:
namespace App\Enum;
enum Status: string
{
case ACTIVE = 'active';
case DRAFT = 'draft';
}
Enum references in YAML:
parameters:
app.default_status: !php/enum App\Enum\Status::ACTIVE
2026-10-26
Completion PHP Twig Form Attribute Navigation
Completes and navigates option keys in #[AsFormType] and #[FormField], field names in PHP get()/has() calls, and form fields in Twig.
Supports inherited and trait properties, custom field names and nested forms. The class marked with #[AsFormType] is the form's data class.
Form attributes and PHP field references:
use Symfony\Component\Form\Attribute\AsFormType;
use Symfony\Component\Form\Attribute\FormField;
use Symfony\Component\Form\Extension\Core\Type\TextType;
#[AsFormType]
class AddressData
{
#[FormField(TextType::class)]
public string $street;
}
#[AsFormType(options: ['label' => 'Contact'])]
class ContactData
{
#[FormField(TextType::class, name: 'displayName', options: ['required' => true])]
public string $name;
#[FormField(AddressData::class)]
public AddressData $address;
}
$form = $this->createForm(ContactData::class);
$form->get('displayName');
$form->has('displayName');
Form field completion and navigation in Twig:
{{ form.displayName }}
{{ form.address.street }}
2026-10-15
Completion Twig PHP Phpdoc
Completes hash keys and literal string values from the PHPDoc array shape of a Twig function's PHP parameter, including nested shapes and imported Psalm or PHPStan type aliases.
Supports named arguments and nested arrays or lists. For cva() and html_cva(), completes default and compound variant names and values from the call's variants argument.
PHP parameter type:
use Twig\Attribute\AsTwigFunction;
final class ButtonRuntime
{
/**
* @param array{size?: 'sm'|'lg', icon?: array{position?: 'start'|'end'}} $options
*/
#[AsTwigFunction('button')]
public function render(array $options): string
{
return '';
}
}
Matching keys and values in Twig:
{{ button({size: 'sm', icon: {position: 'start'}}) }}
UX CSS variants in default and compound variants:
{% set button = cva(
base: {display: 'flex'},
variants: {
size: {sm: {p: '2'}, lg: {p: '4'}}
},
defaultVariants: {size: 'sm'},
compoundVariants: [{size: ['sm', 'lg'], css: {fontWeight: 'bold'}}]
) %}
HTML CVA default and compound variants:
{% set button = html_cva(
base: 'inline-flex',
variants: {size: {sm: 'p-2', lg: 'p-4'}},
defaultVariant: {size: 'sm'},
compoundVariants: [{size: 'lg', class: 'font-bold'}]
) %}
2026-09-17
Completion JavaScript TypeScript Routing Navigation
Completes route names in Routing.generate() and fos.Router.generate() in JavaScript and TypeScript, with navigation to the route definition and controller.
Route names in JavaScript and TypeScript:
Routing.generate('app_product_show', {id: 42});
fos.Router.generate('app_product_show', {id: 42});