Skip to content

Commit bb61fad

Browse files
Attributes that relate to controller arguments should start with Map
1 parent 0bb8fe2 commit bb61fad

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

contributing/code/standards.rst

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -230,8 +230,11 @@ Naming Conventions
230230

231231
* Suffix exceptions with ``Exception``;
232232

233-
* Prefix PHP attributes with ``As`` where applicable (e.g. ``#[AsCommand]``
234-
instead of ``#[Command]``, but ``#[When]`` is kept as-is);
233+
* Prefix PHP attributes that relate to service configuration with ``As``
234+
(e.g. ``#[AsCommand]``, ``#[AsEventListener]``, etc.);
235+
236+
* Prefix PHP attributes that relate to controller arguments with ``Map``
237+
(e.g. ``#[MapEntity]``, ``#[MapCurrentUser]``, etc.);
235238

236239
* Use UpperCamelCase for naming PHP files (e.g. ``EnvVarProcessor.php``) and
237240
snake case for naming Twig templates and web assets (``section_layout.html.twig``,

0 commit comments

Comments
 (0)