---
title: "Coding guidelines"
manual: "TYPO3 Explained"
version: "12.4"
permalink: "https://docs.typo3.org/permalink/t3coreapi:cgl@12.4"
source: "CodingGuidelines/Index.rst"
rendered: "2026-10-21T15:29:37+00:00"
---

> [!WARNING]
> **Attention**
>
> TYPO3 v12 has reached end-of-life as of April 30th 2026 and
> is no longer being maintained. Use the version switcher on the top
> left of this page to select documentation for a supported version of TYPO3.
>
> Need more time before upgrading?
> You can purchase Extended Long Term Support (ELTS) for TYPO3 v12 here:
> [TYPO3 ELTS](https://typo3.com/services/extended-support-elts).

# Coding guidelines {#cgl}

This chapter contains description of the formal requirements or standards
regarding coding that you should adhere to when you develop TYPO3
extensions or Core parts.

> [!TIP]
> You can find an
> [.editorconfig](https://github.com/typo3/typo3/blob/main/.editorconfig)
> file in the TYPO3 Core  repository.
> [Some editors and IDEs](https://editorconfig.org/) can use this
> file and the rules defined within.

Some basic rules are defined in the .editorconfig, such as the charset and
the indenting style. By default, indenting with 4 spaces is
used, but there are a few exceptions (e.g. for YAML or JSON
files).

For the files that are not specifically covered in the subchapters (e.g.
Fluid, .json, or .sql), the information in the .editorconfig file
should be sufficient.

-   [Introduction](https://docs.typo3.org/permalink/t3coreapi:introduction-to-the-typo3-coding-guidelines-cgl@12.4)
-   [PHP architecture](https://docs.typo3.org/permalink/t3coreapi:php-architecture@12.4)
-   [PHP](https://docs.typo3.org/permalink/t3coreapi:php-coding-guidelines@12.4)
-   [PHP Best Practice](https://docs.typo3.org/permalink/t3coreapi:php-best-practices@12.4)
-   [JavaScript](https://docs.typo3.org/permalink/t3coreapi:javascript-coding-guidelines@12.4)
-   [TypeScript](https://docs.typo3.org/permalink/t3coreapi:typescript-coding-guidelines@12.4)
-   [TypoScript](https://docs.typo3.org/permalink/t3coreapi:typoscript-coding-guidelines@12.4)
-   [TSconfig](https://docs.typo3.org/permalink/t3coreapi:tsconfig-coding-guidelines@12.4)
-   [XLIFF](https://docs.typo3.org/permalink/t3coreapi:xliff-coding-guidelines@12.4)
-   [YAML](https://docs.typo3.org/permalink/t3coreapi:yaml-coding-guidelines@12.4)
-   [reStructuredText](https://docs.typo3.org/permalink/t3coreapi:restructuredtext-rest@12.4)
