# PHP Annotations Plugin Other

**Other features** include indexed annotation metadata, the DocBlock-to-PHP-Attributes bridge, optional PHP Toolbox integration, and extension points for framework plugins.

---

## Indexed annotation metadata

**Feature ID:** `AnnotationIndexAndTargets`  
**Feature Page:** [Indexed annotation metadata](https://espend.de/phpstorm/plugin/php-annotations#annotation-index-and-targets)  

The plugin indexes annotation classes and annotation usages from PHP files, then reuses those indexes for completion, navigation, inspections, and usage markers.

Recent 12.x work optimized annotation and attribute lookup paths with index-backed caches and static PSI patterns, which matters in projects with large vendor directories.

### Code Examples

```php
# Indexed annotation declaration:
/**
 * @Annotation
 * @Target("METHOD")
 */
final class RequiresPermission
{
    public string $value;
}
```

```php
# Target-aware usage:
/**
 * @RequiresPermission("product.update")
 */
public function update(): Response
{
}
```

---

## DocBlock annotations and PHP attributes bridge

**Feature ID:** `PhpAttributesBridge`  
**Feature Page:** [DocBlock annotations and PHP attributes bridge](https://espend.de/phpstorm/plugin/php-annotations#php-attributes-bridge)  

The plugin treats PHP attributes as first-class peers of DocBlock annotations for many extension-driven features.

Default values, named arguments, array values, references, alias completion, and Doctrine mapping helpers reuse the same provider model so framework integrations can support both syntaxes consistently.

### Code Examples

```php
# Same framework concept in both syntaxes:
use Symfony\Component\Validator\Constraints\NotBlank;

/**
 * @NotBlank(message="Name is required.")
 */
private string $legacyName;

#[NotBlank(message: 'Name is required.')]
private string $name;
```

---

## Optional PHP Toolbox provider bridge

**Feature ID:** `PhpToolboxIntegration`  
**Feature Page:** [Optional PHP Toolbox provider bridge](https://espend.de/phpstorm/plugin/php-annotations#php-toolbox-integration)  

When PHP Toolbox is installed, this plugin exposes annotation signatures to Toolbox providers.

Toolbox JSON can target default annotation values, named annotation properties, and array properties through `annotation` and `annotation_array` signature types.

### Code Examples

```json
# Default or named value provider:
{
  "registrar": [
    {
      "language": "php",
      "provider": "routes",
      "signatures": [
        {
          "class": "Symfony\\Component\\Routing\\Annotation\\Route",
          "field": "condition",
          "type": "annotation"
        }
      ]
    }
  ]
}
```

```json
# Array value provider:
{
  "class": "Symfony\\Component\\Routing\\Annotation\\Route",
  "field": "methods",
  "type": "annotation_array"
}
```

---

## Extension points for framework plugins

**Feature ID:** `ExtensionPoints`  
**Feature Page:** [Extension points for framework plugins](https://espend.de/phpstorm/plugin/php-annotations#extension-points)  

The plugin exposes dynamic extension points so Symfony and other framework plugins can add annotation-specific behavior without modifying the core plugin.

Extension points cover completion, references, DocTag navigation, DocTag annotation highlighting, global namespaces, virtual properties, and default alias providers.

### Code Examples

```xml
# Available extension concepts:
<PhpAnnotationCompletionProvider implementation="Vendor\\CompletionProvider" />
<PhpAnnotationReferenceProvider implementation="Vendor\\ReferenceProvider" />
<PhpAnnotationDocTagGotoHandler implementation="Vendor\\GotoHandler" />
<PhpAnnotationVirtualProperties implementation="Vendor\\VirtualProperties" />
<PhpAnnotationUseAlias implementation="Vendor\\UseAliasProvider" />
```

---

