Logo   espend.de
Unknown ICU translation parameters in PHP
PhpTranslationParameterInspection
2026-11-13
Inspection PHP Translation

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');
Find Usages for translation keys
TranslationKeyFindUsages
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']);
ICU translation parameter completion
TranslationParameterCompletion
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'
);
Unknown ICU translation parameters in Twig
TwigTranslationParameterInspection
2026-11-13
Inspection Twig Translation

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') }}
Form type guessing from PHP and Doctrine
FormTypeGuessing
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]);
HTML translation completion and navigation
HtmlTranslationCompletion
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',
);
UX CSS color previews
UxCssColorPreview
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'}) }}
UX CSS token values in completion
UxCssTokenCompletion
2026-11-11

Completion Twig UX Css

Shows resolved symfony/ux-css token values in the css() completion popup, with color swatches for color tokens.

Color and spacing token suggestions:

{{ css({color: 'blue.500', p: 'md'}) }}
Navigate to UX CSS token declarations
UxCssTokenGotoDeclarationHandler
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'}) }}
Deprecated Doctrine QueryBuilder sort directions
DoctrineQueryBuilderSortDirectionInspection
2026-10-28
Inspection PHP Doctrine Paid

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);
PHP enum completion and navigation in YAML
YamlPhpEnumCompletion
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
Attribute-based Symfony forms
AttributeFormTypeCompletion
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 }}
Twig function hash completion from PHP types
TwigFunctionHashCompletionProvider
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'}]
) %}
FOSJsRouting route completion and navigation
FosJsRoutingCompletion
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});