Logo   espend.de
Complete Twig constant() references
TwigConstantEnumResolver
2026-05-28

Completion Twig Navigation Find Usages

Completes and resolves PHP constants in Twig constant() calls, including fully qualified class constants, namespaced global constants, and object-relative constants.

The same resolver is used by navigation and Find Usages, so constant references in Twig stay connected to their PHP declarations.

Class and namespaced constants:

{{ constant('App\\Enum\\Status::ACTIVE') }}
{{ constant('BugDemo\\NAMESPACED_CONST') }}

Object-relative constants:

{# @var suite \BugDemo\CardSuite #}
{{ constant('CLUBS', suite) }}
Navigation for typed and named default service bindings
YamlDefaultServiceBindingNavigation
2026-05-28

Navigation Yaml Service

Navigates from YAML _defaults.bind entries to the matching PHP type, parameter, or class target.

This covers both typed bindings and named argument bindings, so default wiring rules remain traceable in larger service files.

Typed and named bindings:

services:
  _defaults:
    bind:
      Psr\Log\LoggerInterface: '@monolog.logger'
      string $projectDir: '%kernel.project_dir%'
Controller action is deprecated
RouteControllerDeprecatedInspection
2026-05-26
Inspection PHP Twig Yaml XML Routing

Reports routes and route usages that point to controller actions marked as deprecated. This helps identify outdated routes that should be removed or updated.

The inspection covers YAML/XML route definitions, PHP route references, and Twig path()/url() calls.

// Controller with deprecated action:
class ProductController extends AbstractController
{
    #[Route('/old-product', name: 'app_old_product')]
    #[Deprecated('Use app_product_show instead')]
    public function oldAction(): Response
    {
        // ...
    }
}

Twig route usage:

{{ url('app_old_product') }}
{{ path('app_old_product') }}
Twig loop context type resolution
TwigLoopContextTypeResolution
2026-05-18

Type Twig

Resolves loop variables and the surrounding loop scope through included templates, so repeated row templates keep type-aware completion and inspections.

This also preserves parent context inheritance when a template is included from inside a for block.

Loop context inheritance:

{% for product in category.products %}
    {% include 'product/_row.html.twig' with { product: product } %}
{% endfor %}

{# product/_row.html.twig #}
{{ loop.index }} {{ product.name }}
Twig method-chain type resolution
TwigMethodChainTypeResolution
2026-05-18

Completion Twig Navigation

Improves Twig completion, navigation, and inspections across chained method calls, property shortcuts, function return types, and filter return types.

This enables suggestions on expressions like entry.children.entries, method-call chains, and values returned by Twig functions or filters.

For-loop path resolution:

{# @var root \App\Dto\CategoryTree #}
{% for entry in root.children.entries %}
    {{ entry.name }}
{% endfor %}

Function/filter return type chains:

{{ product_for_sku(sku).manufacturer.name }}
{{ order|latest_invoice.number }}
Twig include and embed context type resolution
TwigIncludeContextParser
2026-05-10

Type Twig Navigation

Resolves Twig template variables from include and embed context hashes so included templates receive the correct root variables for completion, navigation, and inspections.

Context handling supports explicit keys, inherited parent variables, only isolation, with_context: false, and array or ternary template targets.

Include and embed context keys:

{% include 'product/_card.html.twig' with {
    product: product,
    currentView: 'grid'
} only %}

{% embed 'product/_panel.html.twig' with { product: product } %}
    {% block body %}{{ product.name }}{% endblock %}
{% endembed %}
Include and embed context key completion
TwigIncludeEmbedContextKeyCompletion
2026-05-10

Completion Twig Navigation

Completes top-level variable names inside Twig include and embed context hashes from the target template.

The same context key can navigate back to the variable usage in the included template, so forwarded values stay connected to the template that expects them.

Included template variables:

{# product/_card.html.twig #}
{{ product.name }}
{{ currentView }}

Context key completion:

{% include 'product/_card.html.twig' with {
    product: product,
    currentView: 'grid'
} only %}

{% embed 'product/_card.html.twig' with { product: product } %}
    {% block body %}{{ product.name }}{% endblock %}
{% endembed %}
Symfony type icons for PHP classes
PhpClassFileIconProvider
2026-05-06

Other PHP UX Doctrine Form Console

Decorates PHP class files with Symfony-specific icons so entities, repositories, form types, and console commands are easier to distinguish in the project tree.

The icon decoration is configurable in the Symfony plugin settings and uses the same Symfony metadata that powers navigation and inspections.

Decorated PHP class types:

#[AsCommand(name: 'app:reindex-products')]
final class ReindexProductsCommand extends Command
{
}

#[ORM\Entity(repositoryClass: ProductRepository::class)]
final class Product
{
}

final class ProductType extends AbstractType
{
}
Deprecated Doctrine Table attribute arguments
DoctrineTableAttributeDeprecatedPropertiesInspection
2026-05-04
Inspection PHP Doctrine Paid

Reports Doctrine ORM #[ORM\Table] attributes that still pass indexes or uniqueConstraints. Doctrine ORM deprecates these arguments because they no longer have an effect and will be removed in ORM 4.0.

Use standalone #[ORM\Index] and #[ORM\UniqueConstraint] attributes instead.

Deprecated Table arguments:

use Doctrine\ORM\Mapping as ORM;

#[ORM\Entity]
#[ORM\Table(indexes: [
    new ORM\Index(name: 'idx_product_sku', columns: ['sku']),
])]
class Product
{
}

Use dedicated attributes:

use Doctrine\ORM\Mapping as ORM;

#[ORM\Entity]
#[ORM\Index(name: 'idx_product_sku', columns: ['sku'])]
class Product
{
}
Constraint message translation completion
ConstraintMessageGotoCompletionRegistrar
2026-04-25

Completion PHP Attribute Navigation

Completes and navigates validation translation keys used in Symfony Constraint messages.

In addition to named message: arguments, the completion now supports array-style 'message' keys in PHP constraint configuration.

Attribute message argument:

#[Assert\NotBlank(message: 'product.name.not_blank')]
private string $name;

Array message key:

new Assert\NotBlank([
    'message' => 'product.name.not_blank',
]);
PHP RoutingConfigurator route support
PhpRouteReferenceContributorRoutingConfigurator
2026-04-16

Navigation PHP Routing

Indexes routes declared with Symfony's PHP RoutingConfigurator API and enables completion/navigation for route names, controller targets, methods, defaults, prefixes, and name prefixes.

Routes declared in config/routes.php are available to route completion, route inspections, controller related navigation, and Search Everywhere route lookup.

PHP route configuration:

use Symfony\Component\Routing\Loader\Configurator\RoutingConfigurator;

return static function (RoutingConfigurator $routes): void {
    $routes->add('app_product_show', '/product/{id}')
        ->controller('App\Controller\ProductController::show')
        ->methods(['GET']);
};
Find Usages for PHP symbols from Twig
TwigFindUsagesHandlerFactory
2026-04-15

Other Twig PHP Find Usages

Runs Find Usages from Twig variables, properties, methods, functions, filters, constants, enum cases, and @var type declarations, then delegates to the resolved PHP target.

Usages are grouped as Twig usages so a PHP method or field search also shows property-style Twig shortcuts such as product.name and method calls such as product.getName().

PHP member usages in Twig:

{# @var product \App\Entity\Product #}
{{ product.name }}
{{ product.getName() }}

Twig extension and constant usages:

{{ product_number(product) }}
{{ product.sku|product_label }}
{{ constant('App\\Enum\\Status::ACTIVE') }}
PHP attribute implicit usage detection
SymfonyImplicitUsageProvider
2026-04-12

Other PHP

Marks Symfony, Doctrine, and MCP attribute-driven classes and callback methods as used so IDE unused-declaration inspections do not flag framework entry points.

Covered attributes include commands, event listeners, message handlers, schedules, Twig components, Doctrine listeners, Doctrine lifecycle callbacks, validator callbacks, workflow listeners, autoconfigure tags, and MCP capabilities.

Attribute-driven entry points:

<?php

#[AsCommand(name: 'app:sync')]
final class SyncCommand extends Command
{
    public function __invoke(): int {}
}

#[AsEventListener(event: KernelEvents::EXCEPTION, method: 'onKernelException')]
final class ExceptionListener
{
    public function onKernelException(): void {}
}

#[ORM\PrePersist]
public function updateTimestamps(): void {}
Twig Template Variables MCP Tool
TwigTemplateVariablesMcpToolset
2026-04-12
MCP Twig PHP

Lists all variables available in one or more Twig templates with their PHP types and first-level accessible properties. Accepts template names, project-relative file paths, or Ant-style fileGlob filters.

Variables are collected from controller render calls, include/embed contexts, 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"