xref: /web-php/.github/CONTRIBUTING.md (revision ff36297e)
1# CONTRIBUTING
2
3Anybody who programs in PHP can be a contributing member of the community that
4develops and deploys www.php.net; the task of deploying the www.php.net website is a never-ending one.
5
6You don't need any special access to download, debug and begin submitting
7code, tests or documentation.
8
9## Index
10
11* [Pull requests](#pull-requests)
12* [Filing bugs](#filing-bugs)
13* [Feature requests](#feature-requests)
14* [Writing tests](#writing-tests)
15* [Getting help](#getting-help)
16* [Checklist for submitting contribution](#checklist-for-submitting-contribution)
17* [What happens after submitting contribution?](#what-happens-after-submitting-contribution)
18* [What happens when your contribution is applied?](#what-happens-when-your-contribution-is-applied)
19* [Git commit rules](#git-commit-rules)
20
21## Pull requests
22
23www.php.net welcomes pull requests to [add tests](#writing-tests), fix bugs and to
24implement features. Please be sure to include tests as appropriate!
25
26If your pull request exhibits conflicts with the base branch, please resolve
27them by using `git rebase` instead of `git merge`.
28
29Fork the official www.php.net repository and send a pull request. A notification will be
30sent to the pull request mailing list. Sending a note to [PHP php.net internal infrastructure discussion](mailto:php-webmaster@lists.php.net) may help getting more feedback and quicker turnaround.
31
32## Filing bugs
33
34Bugs can be filed on [GitHub Issues](https://github.com/php/web-php/issues).
35
36Where possible, please include a self-contained reproduction case!
37
38## Feature requests
39
40Feature requests can be filed on [GitHub Issues](https://github.com/php/web-php/issues).
41
42## Writing tests
43
44We love getting new tests! www.php.net is a fairly old project and improving test coverage is
45a huge win for every www.php.net user.
46
47[Our QA site includes a page detailing how to write test cases.](https://qa.php.net/write-test.php)
48
49Submitting test scripts helps us to understand what functionality has changed.
50It is important for the stability and maintainability of www.php.net that tests are
51comprehensive.
52
53## Getting help
54
55If you are having trouble contributing to www.php.net, or just want to talk to a human
56about what you're working on, you can contact us via the
57[PHP php.net internal infrastructure discussion](mailto:php-webmaster@lists.php.net).
58
59## Checklist for submitting contribution
60
61- Update git source just before running your final `diff` and before testing.
62- Create test scripts.
63- Run
64
65  ```shell
66  make tests
67  ```
68
69  to check your change doesn't break other features.
70- Run
71
72  ```shell
73  make coding-standards
74  ```
75
76  to automatically fix coding standard issues.
77- Review the change once more just before submitting it.
78
79## What happens after submitting contribution?
80
81If your change is easy to review and obviously has no side-effects, it might be
82committed relatively quickly.
83
84Because www.php.net is a volunteer-driven effort, more complex changes will require
85patience on your side. If you do not receive feedback in a few days, consider
86bumping. Before doing this think about these questions:
87
88- Did I send the patch to the right mailing list?
89- Did I review the mailing list archives to see if these kind of changes had
90  been discussed before?
91- Did I explain my change clearly?
92- Is my change too hard to review? If so, why?
93
94## What happens when your contribution is applied?
95
96Your name will likely be included in the Git commit log.
97
98## Git commit rules
99
100This section refers to contributors that have Git push access and make commit
101changes themselves. We'll assume you're basically familiar with Git, but feel
102free to post your questions on the mailing list. Please have a look at the more
103detailed [information on Git](https://git-scm.com/).
104
105www.php.net is developed through the efforts of a large number of people. Collaboration
106is a Good Thing(tm), and Git lets us do this. Thus, following some basic rules
107with regards to Git usage will:
108
109- Make everybody happier, especially those responsible for maintaining the website.
110- Keep the changes consistently well documented and easily trackable.
111- Prevent some of those 'Oops' moments.
112- Increase the general level of good will on planet Earth.
113
114Having said that, here are the organizational rules:
115
1161. Respect other people working on the project.
117
1182. Discuss any significant changes on the list before committing.
119
1203. If you "strongly disagree" about something another person did, don't start
121   fighting publicly - take it up in private email.
122
1234. If you don't know how to do something, ask first!
124
1255. Test your changes before committing them. We mean it. Really. To do so use
126
127   ```shell
128   make tests
129   ```
130
1315. Fix coding standard issues before committing code. To do so use
132
133   ```shell
134   make coding-standards
135   ```
136
1376. Use reasonable commit messages.
138
139Thank you for contributing to https://www.php.net!
140