You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+25-11Lines changed: 25 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,11 +1,13 @@
1
1
# Contribution guidelines
2
+
2
3
**SimpleSAMLphp welcomes all contributions**. It is impossible to make a product like this without the efforts of many people, so please don't be shy and share your help with us. Even the tiniest contribution can make a difference!
3
4
4
5
These guidelines briefly explain how to contribute to SimpleSAMLphp effectively and consistently, making sure to keep high quality standards and making it easier for you to contribute.
5
6
6
7
[TOC]
7
8
8
9
## Team members
10
+
9
11
Currently, the core team members are:
10
12
11
13
* Jaime Pérez Crespo, *maintainer and main developer*, UNINETT <jaime.perez@uninett.no>
@@ -22,6 +24,7 @@ We have been lucky enough to have so many people help us through the years. Simp
22
24
***Big thanks to you all!***
23
25
24
26
## First things first
27
+
25
28
Before embarking yourself in a contribution, please make sure you are familiar with the way SimpleSAMLphp is written, the way it works, and what is required or not.
26
29
27
30
* Make sure to read [the documentation](https://simplesamlphp.org/docs/stable/). If you use the search engine in the website, please verify that you are reading the latest stable version. If you want to make a change, check [the development branch of the documentation](https://simplesamlphp.org/docs/development/).
@@ -30,39 +33,45 @@ Before embarking yourself in a contribution, please make sure you are familiar w
30
33
* If you think you have discovered a bug, please check the [issue tracker](https://github.com/simplesamlphp/simplesamlphp/issues) and the [pull requests](https://github.com/simplesamlphp/simplesamlphp/pulls) to verify it hasn't been reported already.
31
34
32
35
## Contributing code
36
+
33
37
New features are always welcome, provided they will be useful to someone apart from yourself. Please take a look at the [list of issues](https://github.com/simplesamlphp/simplesamlphp/issues) to see what people are asking for. Our [roadmap](https://simplesamlphp.org/releaseplan) might also be a good place to start if you do not know exactly how you can contribute.
34
38
35
39
When submitting a pull request, please make sure to account for:
36
40
37
41
### Coding standards
42
+
38
43
* Respect the coding standards. We try to comply with PHP's [PSR-12](http://www.php-fig.org/psr/psr-12/). Pay special attention to the rules below:
39
-
* Lines should not be longer than 80 characters.
40
-
* Use **4 spaces** instead of tabs.
41
-
* Keep the keywords in **lowercase**, including `true`, `false` and `null`.
42
-
* Make sure your classes work with *autoloading*.
43
-
* Never include a trailing `?>` in your files.
44
-
* The first line of every file must be `<?php`.
45
-
* Use namespaces if you are adding new files.
44
+
* Lines should not be longer than 80 characters.
45
+
* Use **4 spaces** instead of tabs.
46
+
* Keep the keywords in **lowercase**, including `true`, `false` and `null`.
47
+
* Make sure your classes work with *autoloading*.
48
+
* Never include a trailing `?>` in your files.
49
+
* The first line of every file must be `<?php`.
50
+
* Use namespaces if you are adding new files.
46
51
* Do not include too many changes in every commit. Commits should be focused and address one single problem or feature. By having **multiple, small commits** instead of fewer large ones, it is easier to track what you are doing, revert changes in case of an error and help you make changes if needed.
47
52
* Try to write clean **commit messages**, largely based on the [seven rules](http://chris.beams.io/posts/git-commit/):
48
-
* Write a **short** subject line, followed by a blank line and a longer explanation.
49
-
* Prefix the subject line with the component(s) changed, e.g. "docs: Update foo", or "SAML: Don't log bar twice", or "tests: Add tests for quux".
50
-
* Explain **what and why** in the commit message, not just _how_. Things that seem obvious now might become quite confusing when rediscovered years later.
53
+
* Write a **short** subject line, followed by a blank line and a longer explanation.
54
+
* Prefix the subject line with the component(s) changed, e.g. "docs: Update foo", or "SAML: Don't log bar twice", or "tests: Add tests for quux".
55
+
* Explain **what and why** in the commit message, not just **how**. Things that seem obvious now might become quite confusing when rediscovered years later.
51
56
52
57
### Comments, comparisons, and simplicity
58
+
53
59
* Add comments that describe why/how your code works.
54
60
* Include complete **phpdoc** documentation for every property and method you add. If you change a method or property, make sure to update the existing *phpdoc* accordingly. Do not forget to document all parameters, returned values and exceptions thrown.
55
61
* Use strict comparison operators like `===` and check for specific values when writing tests.
56
62
* Avoid big functions, long nested loops or `if` statements.
57
63
* Try to keep **backwards-compatibility**. Code that breaks current configurations and installations is difficult to deploy, and therefore we try to avoid that as much as possible.
58
64
59
65
### Unit tests
66
+
60
67
Add **unit tests** to verify that your code not only works but also keeps working over time. When adding tests, keep the same directory structure used for regular classes. Try to cover **all your code** with tests. The bigger the test coverage, the more reliable and better our library is. Read our [guidelines](TESTING.md) to learn more about tests.
61
68
62
69
### Documentation
70
+
63
71
In order to keep this library user-friendly, we ask that you add proper **documentation** explaining how to use your new feature or how your code changes things.
64
72
65
73
### Pull requests
74
+
66
75
Please follow all instructions below:
67
76
68
77
1. Submit your code as a **pull request** in github from a branch with a descriptive name in your own fork of the repository.
@@ -72,6 +81,7 @@ Please follow all instructions below:
72
81
Sometimes it can take a long time before we are able to process your pull requests. Do not get discouraged, we will eventually reach your change. Remember that by following these guidelines, you are making it easier for us to analyze your request so the process will be smooth and fast. We really appreciate you helping us out, not only with your code, but also by following these guidelines.
73
82
74
83
## Reporting bugs
84
+
75
85
Before reporting a bug, please make sure it is indeed a bug. Check [the documentation](https://simplesamlphp.org/docs/stable/) to verify what the intended behaviour is. Review the [issue tracker](https://github.com/simplesamlphp/simplesamlphp/issues) and the [pull requests](https://github.com/simplesamlphp/simplesamlphp/pulls) to see if someone has already reported the same issue.
76
86
77
87
If you are able, a pull request is much more appreciated than just a new issue. If not, please do not hesitate to open one. It is better to have just an issue report than nothing!
@@ -86,6 +96,7 @@ You can help us diagnose and fix bugs by asking and providing answers to the fol
86
96
* Is this a security issue? If so, how severe is it? How can an attacker exploit it? Read more about security issues in the next section.
87
97
88
98
## Reporting vulnerabilities
99
+
89
100
In case you find a vulnerability in SimpleSAMLphp, or you want to confirm a possible security issue in the software, please get in touch with us through [UNINETT's CERT team](https://www.uninett.no/cert). Please use our PGP public key to encrypt any possibly sensitive data that you may need to submit. We will get back to you as soon as possible according to our working hours in Central European Time.
90
101
91
102
When reporting a security issue, please add as much information as possible to help us identify, confirm, replicate and fix the problem. In particular, remember to include the following information in your report:
@@ -107,16 +118,19 @@ Finally, be reasonable. We'll do our best to resolve the issue according to our
107
118
You can find the list of security advisories we have published [here](https://simplesamlphp.org/security).
108
119
109
120
## Translations
121
+
110
122
SimpleSAMLphp is translated to many languages, though it needs constant updates from translators, as well as new translations to other languages. For the moment, translations can be contributed as **pull requests**. We are looking at better ways to translate the software that would make your life easier, so stay tuned! You can also join the [translators mailing list](http://groups.google.com/group/simplesamlphp-translation) to keep up to date on the latest news.
111
123
112
124
Before starting a new translation, decide what style you want to use, whether you want to address the user in a polite manner or not, etc. Be coherent and keep that style through all your translations. If there is already a translation and you want to complete it, make sure to keep the same style used by your fellow translators.
113
125
114
-
## Documentation
126
+
## Documentation improvements
127
+
115
128
Did you find a typo in the documentation? Does something make no sense? Did we use poor english? Tell us!
116
129
117
130
Documentation is included in our own repository in *markdown* format. You can submit pull requests with fixes. If you encounter some feature that is not documented, or the documentation does not reflect the real behaviour of the library, please do not hesitate to open an issue.
118
131
119
132
Good documentation is key to make things easier for our users!
120
133
121
134
## Community
135
+
122
136
You do not feel capable of contributing with your code, but are using SimpleSAMLphp and can share your knowledge and experience? Please, do so! Join our [users mailing list](http://groups.google.com/group/simplesamlphp) and help other users when you can. Your experience might be valuable for many!
0 commit comments