engelsystem/CONTRIBUTING.md

26 lines
1.7 KiB
Markdown
Raw Normal View History

2019-12-01 15:50:31 +01:00
# Contributing
2020-01-17 14:58:42 +01:00
## Coding guide lines
2020-05-13 18:40:03 +02:00
* Make sure your code follows the [PSR-12](https://www.php-fig.org/psr/psr-12/) code style and is [.editorconfig](.editorconfig) valid.
You may use `composer run phpcs` and [Editorconfig-Checker](https://editorconfig-checker.github.io) to verify that.
2019-12-01 15:50:31 +01:00
* Use `use` statements wherever possible instead of writing the fully qualified name.
* Order the composer/npm dependencies alphabetically.
2022-10-01 20:53:17 +02:00
* Do not use code from the [includes](includes) directory anywhere else.
* Please cover your code by unit tests, our goal is to stay at 100% line coverage.
Code under `includes` does not require tests as it's mostly not testable and needs to be rewritten.
* Do not use vendor prefixes like `-webkit` in styles.
2022-10-01 20:53:17 +02:00
This is done by PostCSS + Autoprefixer according to the [`.browserslistrc`](.browserslistrc).
* Translations must be abbreviated, for example `form.save`.
The `default.po` files contain translations that can be auto-detected using Poedit, `additional.po` contains generated messages like validations.
2020-01-17 14:58:42 +01:00
## Pull requests
2022-10-01 20:53:17 +02:00
* The PR should contain a short overview of the changes.
* Before implementing bigger changes, please open an issue to discuss the feature and possible implementation options.
* Please create single pull requests for every feature instead of creating one big monster of pull request containing a complete rewrite.
* Squash similar commits to make the review easier.
* For visual changes, include both before and after screenshots to easily compare and discuss changes.
## Commits
* The commit message must be meaningful. It should serve as a short overview of the changes.
If needed, an additional description can be provided.
* A commit should be self-contained and result in a working Engelsystem.