Skip to content

Latest commit

 

History

History
30 lines (18 loc) · 1.21 KB

File metadata and controls

30 lines (18 loc) · 1.21 KB

Code Style

Commitlint

We use Conventional Commits for consistency in our Git commit messages. Commit messages are linted when pull requests are opened.

PHP Linting

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.sh

If 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-commmit

Environment Variables

Passwords 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.

Global Constants

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.