We use Conventional Commits for consistency in our Git commit messages. Commit messages are linted when pull requests are opened.
Our PHP files follow the PSR-12: Extended Coding Style. You can lint PHP files by running this script in the root directory of this application:
bash run_linter_php.shIf you want to automate running the linter as part of the Git commit process, you can add a pre-commmit hook to your environment:
cp bin/pre-commmit .git/hooks/pre-commmit
chmod 700 .git/hooks/pre-commmitPasswords and environment-specific values shouldn't be checked into the repository. If you're adding a new environment variable, add the key to .env.example without specifying a value.
PHP constants are defined in constants.inc.php. These values are safe to check into the repository. However, if any of these values need to be changed frequently, it may be better to change them to read from a .env file.
Twig constants are defined in config/twig.php. Twig constants that rely on sessions are defined in config/session.php.