File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -206,8 +206,12 @@ Naming Conventions
206
206
* Use `snake_case `_ for configuration parameters and Twig template variables
207
207
(e.g. ``framework.csrf_protection ``, ``http_status_code ``);
208
208
209
- * Use namespaces for all PHP classes and `UpperCamelCase `_ for their names (e.g.
210
- ``ConsoleLogger ``);
209
+ * Use `SCREAMING_SNAKE_CASE `_ for constants (e.g. ``InputArgument::IS_ARRAY ``);
210
+
211
+ * Use `UpperCamelCase `_ for enumeration cases (e.g. ``InputArgumentMode::IsArray ``);
212
+
213
+ * Use namespaces for all PHP classes, interfaces, traits and enums and
214
+ `UpperCamelCase `_ for their names (e.g. ``ConsoleLogger ``);
211
215
212
216
* Prefix all abstract classes with ``Abstract `` except PHPUnit ``*TestCase ``.
213
217
Please note some early Symfony classes do not follow this convention and
@@ -218,6 +222,9 @@ Naming Conventions
218
222
219
223
* Suffix traits with ``Trait ``;
220
224
225
+ * Don't use a dedicated suffix for classes or enumerations (e.g. like ``Class ``
226
+ or ``Enum ``), except for the cases listed below.
227
+
221
228
* Suffix exceptions with ``Exception ``;
222
229
223
230
* Prefix PHP attributes with ``As `` where applicable (e.g. ``#[AsCommand] ``
You can’t perform that action at this time.
0 commit comments