Skip to content

Commit 95d198e

Browse files
committed
minor #16147 Document PHP attribute naming convention (wouterj)
This PR was merged into the 4.4 branch. Discussion ---------- Document PHP attribute naming convention Commits ------- 19af567 Document PHP attribute naming convention
2 parents 80567cc + 19af567 commit 95d198e

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

contributing/code/standards.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,9 @@ Naming Conventions
224224

225225
* Suffix exceptions with ``Exception``;
226226

227+
* Prefix PHP attributes with ``As`` where applicable (e.g. ``#[AsCommand]``
228+
instead of ``#[Command]``, but ``#[When]`` is kept as-is);
229+
227230
* Use UpperCamelCase for naming PHP files (e.g. ``EnvVarProcessor.php``) and
228231
snake case for naming Twig templates and web assets (``section_layout.html.twig``,
229232
``index.scss``);

0 commit comments

Comments
 (0)