We love your input! We want to make contributing to Leantime as easy and transparent as possible. There are many ways to contribute:
We use master
as our primary development branch. All changes should be made through feature branches and pull requests:
- Fork the repository and create your branch from
master
- Create feature branches using the format:
feature/your-feature-name
- For bug fixes use:
fix/bug-description
- For documentation updates use:
docs/what-you-documented
- For translations use Crowdin instead of direct pull requests
We use GitHub to host code, track issues and feature requests, and accept pull requests. Pull requests are the best way to propose changes.
- Ensure your code follows our coding standards (PSR-12)
- Add/update tests for any new features
- Update documentation as needed
- Ensure all tests pass locally
- Run code style checks:
make codesniffer make phpstan
- Include screenshots for user interface changes
- Update the CHANGELOG.md if needed
- Sign the Contributor License Agreement when prompted
Developers who wish to contribute code to be considered for inclusion in Leantime must first complete a Contributor License Agreement (CLA). We use CLA assistant to manage signatures. You will be asked to sign the CLA with your first pull request. Subsequent pull requests will not require additional signatures. Please keep in mind that:
Report bugs using GitHub's issues
We use GitHub issues to track public bugs. Report a bug by opening a new issue; it's that easy!
We use Crowdin to manage our translations. Please update translations in this project At this point we will stop accepting pull requests into the language files directly as this is causing issues with the Crowdin sync process.
This is an example of a bug report, and we have modeled the issue templates after that. Here's another example from Craig Hockenberry, an app developer whom I greatly respect.
Great Bug Reports tend to have:
- Be specific!
- Give sample code if you can. My stackoverflow question includes sample code that anyone with a base R setup can run to reproduce what I was seeing
People love thorough bug reports. I'm not even kidding.
-
Fork and clone the repository
-
Install dependencies:
make install-deps-dev
-
Set up your environment:
- Copy
.env.example
to.env
- Configure your database
- Set up local development server
- Copy
-
Run development build:
make build-dev
-
Run tests:
make unit-test make acceptance-test
We are using the PSR-12 coding style for PHP.
As mentioned above we are following PSR-12 naming conventions. Some areas are not covered in the standard and will be covered in this section. For sake of completion we include all naming conventions in this section.
Classes
Pascal Case (Example: Leantime\\Core\\Http\\Request
)
Class Methods
Camel Case (Example: $object->getItem()
)
Variable Names
Camel Case (Example: $variableName
)
Array Index Keys
Camel Case (Example: $array['indexDefinition']
)
Constants
Macro Case (Example: MY_CONSTANT
)
Event Strings
Camel Case with periods for the path (Example: leantime.core.controller.frontController.someEvent
)
HTML elements, classes, ids
Kebab Case (Example: <div class="my-class" id="my-id">
)
Blade Components
Kebab Case (Example: <x-global::my-directive>
)
Blade File Names
Kebab Case + blade.php
(Example: my-directive.blade.php
)
This document was adapted from the open-source contribution guidelines for Facebook's Draft