# PHP Annotations Plugin Settings

**Settings** features configure plugin behavior, project defaults, aliases, indexing, and editor insertion style.

---

## Project settings for annotations and attributes

**Feature ID:** `AnnotationSettings`  
**Feature Page:** [Project settings for annotations and attributes](https://espend.de/phpstorm/plugin/php-annotations#annotation-settings)  

The plugin adds `PHP > Annotations / Attributes` settings for insert behavior and index maintenance.

The round-bracket option controls whether annotation and attribute completion inserts calls such as `@Assert\NotBlank()` and `#[ORM\Entity()]`, or leaves the class name without brackets.

The same settings page exposes a reindex action for annotation metadata, useful after adding or updating vendor packages that provide new annotation classes.

### Code Examples

```php
# With round brackets enabled:
/**
 * @Assert\NotBlank()
 */
private string $name;
```

```php
# With round brackets disabled:
/**
 * @Assert\NotBlank
 */
private string $name;
```

---

## Configurable alias imports

**Feature ID:** `UseAliasSettings`  
**Feature Page:** [Configurable alias imports](https://espend.de/phpstorm/plugin/php-annotations#use-alias-settings)  

Alias settings map a namespace to the alias that should be inserted during completion. This keeps common annotation code short while still creating real PHP imports.

Built-in aliases cover Symfony Validator, Doctrine ORM, JMS, Gedmo, VichUploader, FOSRest, Swagger/OpenAPI, OpenAPI Attributes, and Sunrise Router. Third-party plugins can add more defaults through the alias extension point.

### Code Examples

```text
# Alias setting:
Doctrine\ORM\Mapping -> ORM
Symfony\Component\Validator\Constraints -> Assert
OpenApi\Attributes -> OA
```

```php
# Inserted code:
use Doctrine\ORM\Mapping as ORM;

#[ORM\Entity()]
#[ORM\Table(name: 'product')]
final class Product {}
```

---

