diff --git a/.gitignore b/.gitignore index bb4565e9..ed249de0 100644 --- a/.gitignore +++ b/.gitignore @@ -5,6 +5,7 @@ /bin/* !bin/console +/config/packages/local.yaml /var/data/kimai.sqlite /var/coverage/ diff --git a/src/Kernel.php b/src/Kernel.php index 1263cfa0..6f2e6e13 100644 --- a/src/Kernel.php +++ b/src/Kernel.php @@ -61,6 +61,7 @@ class Kernel extends BaseKernel if (is_dir($confDir.'/packages/'.$this->environment)) { $loader->load($confDir.'/packages/'.$this->environment.'/**/*'.self::CONFIG_EXTS, 'glob'); } + $loader->load($confDir.'/packages/local'.self::CONFIG_EXTS, 'glob'); $loader->load($confDir.'/services'.self::CONFIG_EXTS, 'glob'); $loader->load($confDir.'/services_'.$this->environment.self::CONFIG_EXTS, 'glob'); diff --git a/var/docs/configurations.md b/var/docs/configurations.md index d6ec18c0..ab7a5146 100644 --- a/var/docs/configurations.md +++ b/var/docs/configurations.md @@ -1,6 +1,8 @@ # Configurations -There are several configurations that can be configured with the yaml files in `config/packages/*.yaml +There are several configurations that can be configured with the yaml files in `config/packages/*.yaml`` + +Please read _Overwriting local configs_ to know where to store your own settings. ## Duration only @@ -92,3 +94,25 @@ kimai: days: ['saturday','sunday'] factor: 1.5 ``` + +## Overwriting local configs + +You can create the file `config/packages/local.yaml` and store your own settings inside. This file will NEVER be shipped with Kimai. + +So having your custom settings in this file allows you to easily update Kimai. This is the same concept as used for the `.env` file. + +An example `config/packages/local.yaml` file might look like this: +```yaml +kimai: + timesheet: + rounding: + default: + begin: 15 + end: 15 + +twig: + globals: + kimai_context: + date_1: "Y-m-d" +``` +After changing the file you have to clear the cache with `bin/console cache:clear` or `bin/console cache:clear --env=prod`.