Skip to content

Commit 1c06551

Browse files
committed
adds development and contribution guidelines
1 parent ca7b16a commit 1c06551

File tree

3 files changed

+137
-5
lines changed

3 files changed

+137
-5
lines changed

CONTRIBUTING.md

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# Contributing Guidelines
2+
3+
For anyone looking to get involved to this project, we are glad to hear from you. Here are a few types of contributions
4+
that we would be interested in hearing about.
5+
6+
* Bug fixes
7+
- If you find a bug, please first report it using Github Issues.
8+
- Issues that have already been identified as a bug will be labelled `bug`.
9+
- If you'd like to submit a fix for a bug, send a Pull Request from your own fork and mention the Issue number.
10+
+ Include a test that isolates the bug and verifies that it was fixed.
11+
* New Features
12+
- If you'd like to accomplish something in the library that it doesn't already do, describe the problem in a new
13+
Github Issue.
14+
- Issues that have been identified as a feature request will be labelled `enhancement`.
15+
- If you'd like to implement the new feature, please wait for feedback from the project maintainers before spending
16+
too much time writing the code. In some cases, `enhancement`s may not align well with the project objectives at
17+
the time.
18+
* Tests, Documentation, Miscellaneous
19+
- If you think the test coverage could be improved, the documentation could be clearer, you've got an alternative
20+
implementation of something that may have more advantages, or any other change we would still be glad hear about
21+
it.
22+
- If its a trivial change, go ahead and send a Pull Request with the changes you have in mind
23+
- If not, open a Github Issue to discuss the idea first.
24+
25+
## Requirements
26+
27+
For a contribution to be accepted:
28+
29+
* The test suite must be complete and pass
30+
* Code must follow existing styling conventions
31+
* Commit messages must be descriptive. Related issues should be mentioned by number.
32+
33+
If the contribution doesn't meet these criteria, a maintainer will discuss it with you on the Issue. You can still
34+
continue to add more commits to the branch you have sent the Pull Request from.
35+
36+
## How To
37+
38+
1. Fork this repository on GitHub.
39+
1. Clone/fetch your fork to your local development machine.
40+
1. Create a new branch (e.g. `issue-12`, `feat.add_foo`, etc) and check it out.
41+
1. Make your changes and commit them. (Did the tests pass?)
42+
1. Push your new branch to your fork. (e.g. `git push myname issue-12`)
43+
1. Open a Pull Request from your new branch to the original fork's `master` branch.
44+
45+
## Developer Guidelines
46+
47+
See DEVELOPING.md for guidelines for developing this project.

DEVELOPING.md

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
# Development Guidelines
2+
3+
This document describes tools, tasks and workflow that one needs to be familiar with in order to effectively maintain
4+
this project. If you use this package within your own software as is but don't plan on modifying it, this guide is
5+
**not** for you.
6+
7+
## Tools
8+
9+
* [Phing](http://www.phing.info/): used to run predefined tasks. Installed via Composer into the vendor directory. You
10+
can run phing but using the command line script `./vendor/bin/phing` or you can put it on your PATH.
11+
* [Composer](https://getcomposer.org/): used to manage dependencies for the project.
12+
13+
## Tasks
14+
15+
### Testing
16+
17+
This project's tests are written as PHPUnit test cases. Common tasks:
18+
19+
* `./vendor/bin/phing test` - run the test suite.
20+
21+
### Releasing
22+
23+
In order to create a release, the following should be completed in order.
24+
25+
1. Ensure all the tests are passing (`./vendor/bin/phing test`) and that there is enough test coverage.
26+
1. Make sure you are on the `master` branch of the repository, with all changes merged/commited already.
27+
1. Update the version number in the source code and the README. See [Versioning](#versioning) for information
28+
about selecting an appropriate version number. Files to change:
29+
- src/OpenTok/Util/Client.php
30+
- sample/HelloWorld/composer.json
31+
- sample/Archiving/composer.json
32+
- README.md
33+
1. Commit the version number change with the message "Update to version x.x.x", substituting the new version number.
34+
1. Create a git tag: `git tag -a vx.x.x -m "Release vx.x.x"`
35+
1. Change the version number for future development by adding "-alpha.1" in each file, then make another commit with the
36+
message "Begin development on next version".
37+
1. Push the changes to the source repository: `git push origin master`
38+
1. Create a zip for uploading the release to Github Releases
39+
40+
## Workflow
41+
42+
### Versioning
43+
44+
The project uses [semantic versioning](http://semver.org/) as a policy for incrementing version numbers. For planned
45+
work that will go into a future version, there should be a Milestone created in the Github Issues named with the version
46+
number (e.g. "v2.2.1").
47+
48+
During development the version number should end in "-alpha.x" or "-beta.x", where x is an increasing number starting from 1.
49+
50+
### Branches
51+
52+
* `master` - the main development branch.
53+
* `feat.foo` - feature branches. these are used for longer running tasks that cannot be accomplished in one commit.
54+
once merged into master, these branches should be deleted.
55+
* `vx.x.x` - if development for a future version/milestone has begun while master is working towards a sooner
56+
release, this is the naming scheme for that branch. once merged into master, these branches should be deleted.
57+
58+
### Tags
59+
60+
* `vx.x.x` - commits are tagged with a final version number during release.
61+
62+
### Issues
63+
64+
Issues are labelled to help track their progress within the pipeline.
65+
66+
* no label - these issues have not been triaged.
67+
* `bug` - confirmed bug. aim to have a test case that reproduces the defect.
68+
* `enhancement` - contains details/discussion of a new feature. it may not yet be approved or placed into a
69+
release/milestone.
70+
* `wontfix` - closed issues that were never addressed.
71+
* `duplicate` - closed issue that is the same to another referenced issue.
72+
* `question` - purely for discussion
73+
74+
### Management
75+
76+
When in doubt, find the maintainers and ask.

README.md

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@ applications, and [archive](http://tokbox.com/#archiving) OpenTok 2.0 sessions.
99
If you are updating from a previous version of this SDK, see
1010
[Important changes in v2.2](#important-changes-in-v22).
1111

12-
# Installation with Composer (recommended):
12+
# Installation
13+
14+
## Composer (recommended):
1315

1416
Composer helps manage dependencies for PHP projects. Find more info here: <http://getcomposer.org>
1517

@@ -20,6 +22,15 @@ command line:
2022
$ composer require opentok/opentok 2.2.x
2123
```
2224

25+
## Manually:
26+
27+
Download the zip file for the latest release from the [Releases](https://github.com/opentok/opentok-php-sdk/releases)
28+
page. Unzip the file and place it into your project directory. If you have a
29+
[PSR-4](http://www.php-fig.org/psr/psr-4/) compliant loader, you should place the unzipped directory
30+
into a place your loader can find it. Otherwise, place it in the
31+
[include_path](http://www.php.net/manual/en/ini.core.php#ini.include-path) and include or require
32+
the files as necessary.
33+
2334
# Usage
2435

2536
## Initializing
@@ -192,10 +203,8 @@ docs directory of the SDK.
192203

193204
# Development and Contributing
194205

195-
Interested in contributing? We <3 pull requests! File a new
196-
[Issue](https://github.com/opentok/opentok-php-sdk/issues) or take a look at the existing ones. If
197-
you are going to send us a pull request, please try to run the test suite first and also include
198-
tests for your changes.
206+
Interested in contributing? We :heart: pull requests! See the [Development](DEVELOPING.md) and
207+
[Contribution](CONTRIBUTING.md) guidelines.
199208

200209
# Support
201210

0 commit comments

Comments
 (0)