TYPO3 Coding Guidelines for Integrators
TYPO3
Show in appBeschreibung
TYPO3 defines coding guidelines (CGL) for the configuration file formats that integrators work with every day: TypoScript, TSconfig, XLIFF, PHP, YAML etc.. The guidelines cover mandatory file extensions, recommended directory structures, and consistent formatting rules. Following them makes code easier to read, review, and maintain across the entire team. An .editorconfig file in TYPO3 projects encodes these rules in a tool-agnostic way so that every developer gets the correct formatting applied automatically in their editor, regardless of which IDE they use. Without it, each IDE formats files slightly differently, which leads to unnecessary changes in Git and makes merge conflicts more likely.
Ziele
- I know that TypoScript files must use the .typoscript file extension and that distinct file names exist for constants and setup in static templates.
- I know that TSconfig files use the .tsconfig extension and follow TypoScript syntax.
- I know that XLIFF is the standard format for localisation files in TYPO3 extensions and that a naming convention exists for source-language and translated variants.
- I know that YAML is used in TYPO3 for site configuration, routing, and form definitions, and that YAML files follow the same 2-space indentation convention as all other TYPO3 configuration formats.
- I know that PHP files in TYPO3 follow PSR-12 (PHP Standard Recommendation) as the coding standard, which covers formatting rules such as 4-space indentation, and that this applies to any PHP files an integrator may write or maintain in a sitepackage.
- I know that JavaScript files in TYPO3 extensions follow a defined Style Guide, use 2-space indentation with spaces instead of tabs, and use single quotes for strings.
- I know what an .editorconfig file is, how it enforces formatting rules across different editors automatically, and why committing it to a shared repository prevents inconsistencies when multiple developers work on the same codebase.
Maintainer
Oliver Thiele
Web Development Oliver Thiele