Warning: This document is for the development version of Bareos Documentation. The main version is bareos-24.

PHP

Guiding Principles

All new PHP code should follow the PSR-12 extended coding style and guidelines.

Automatic Sourcecode Formatting

All PHP code should be formatted using automatic sourcecode formatting. For this, the tool PHP CS Fixer should be used.

You can use the scripts devtools/php-cs-fixer/install-php-cs-fixer.sh to install php-cs-fixer and devtools/php-cs-fixer/run-php-cs-fixer.sh to run it.