> For the complete documentation index, see [llms.txt](https://docs.sylius.com/public/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.sylius.com/public/open-source/contributing/contributing-code/conventions.md).

# Conventions

This document describes conventions used in the Sylius to make it more consistent and predictable. Any new code delivered to Sylius should comply with the following conventions, we also encourage you to use them in your own projects based on Sylius.

### Naming

* Use `camelCase` for:
  * PHP variables,
  * method names (except PHPSpec and PHPUnit),
  * arguments,
  * Twig templates;
* Use `snake_case` for:
  * configuration parameters,
  * Twig template variables,
  * fixture fields,
  * YAML files,
  * XML files,
  * Behat feature files,
  * PHPSpec method names,
  * PHPUnit method names;
* Use `SCREAMING_SNAKE_CASE` for:
  * constants,
  * environment variables;
* Use `UpperCamelCase` for:
  * classes names,
  * interfaces names,
  * traits names,
  * other PHP file names;
* Prefix abstract classes with *Abstract*,
* Suffix interfaces with *Interface*,
* Suffix traits with *Trait*,
* Use a command name with the *Handler* suffix to create a name of the command handler,
* Suffix exceptions with *Exception*,
* Suffix PHPSpec classes with *Spec*,
* Suffix PHPUnit tests with *Test*,
* Prefix Twig templates that are partial blocks with *\_*,
* Use the fully qualified class name (FQCN) of an interface as a service name of a newly created service or FQCN of a class if there are multiple implementations of a given interface unless it is inconsistent with the current scope of Sylius.<br>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.sylius.com/public/open-source/contributing/contributing-code/conventions.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
