Skip to content
rugk edited this page Feb 9, 2017 · 13 revisions

Nice to see you want to contribute to this library. 👍 🎉

Where to contribute?

As described in the branches and releases section you should push your changes to master, which is the default branch. We understand that you may be want to have the changes added to the official Threema SDK hosted at the website. And this is possible, because Threema has expressed that they will still accept patches and further changes to their official SDK. If Pull Requests are merged we may periodically reach out to Threema to get these patches into the official SDK.

Builds

There is a script called buildPhar.php included in the repo. You can use it to build the phar file.

A note about submodules

In this repo submodules are used. On GitHub you see them as links to other repositories and basically this is also what they are.
When you clone this repo, however you have to run two commands to use the repo with submodules:

git submodule init

and

git submodule update

Afterwards you should see all files in the directory with the submodule.
More information: Git Tools - Submodules

Adding a new file

If you add a new PHP file it should always begin like this:

<?php
/**
 * @author Threema GmbH
 * @copyright Copyright (c) 2016-2017 Threema GmbH
 */

Even if Threema is not the author of this file you have to write Threema there. This is only a legal thing, because it shows that this file is part of this library and is licensed under the MIT license.

Code style

Mostly we keep to the style of the official Threema SDK to keep a persistent style in all parts of the PHP library.

[ToDo: Make a list of all things to pay attention]