1- # How to become a contributor and submit your own code
1+ # Contributing to OpenCensus for PHP
2+
3+ 1 . ** Sign one of the contributor license agreements below.**
4+ 2 . Fork the repo, develop, and test your code changes.
5+ 3 . Send a pull request.
26
37## Contributor License Agreements
48
@@ -9,26 +13,57 @@ Please fill out either the individual or corporate Contributor License Agreement
913(CLA).
1014
1115 * If you are an individual writing original source code and you're sure you
12- own the intellectual property, then you'll need to sign an [ individual CLA ]
13- (https://developers.google.com/open-source/cla/individual ).
16+ own the intellectual property, then you'll need to sign an
17+ [ individual CLA ] ( https://developers.google.com/open-source/cla/individual ) .
1418 * If you work for a company that wants to allow you to contribute your work,
15- then you'll need to sign a [ corporate CLA ]
16- (https://developers.google.com/open-source/cla/corporate ).
19+ then you'll need to sign a
20+ [ corporate CLA ] ( https://developers.google.com/open-source/cla/corporate ) .
1721
1822Follow either of the two links above to access the appropriate CLA and
1923instructions for how to sign and return it. Once we receive it, we'll be able to
2024accept your pull requests.
2125
22- ## Contributing A Patch
23-
24- 1 . Submit an issue describing your proposed change to the repo in question.
25- 1 . The repo owner will respond to your issue promptly.
26- 1 . If your proposed change is accepted, and you haven't already done so, sign a
27- Contributor License Agreement (see details above).
28- 1 . Fork the desired repo, develop and test your code changes.
29- 1 . Ensure that your code adheres to the existing style in the sample to which
30- you are contributing. Refer to the
31- [ Google Cloud Platform Samples Style Guide]
32- (https://github.com/GoogleCloudPlatform/Template/wiki/style.html ) for the
33- recommended coding standards for this organization.
34- 1 . Submit a pull request.
26+ ## Setup
27+
28+ In order to use OpenCensus for PHP, some setup is required!
29+
30+ 1 . Install PHP. OpenCensus for PHP requires PHP 5.6 or higher. Installation of
31+ PHP varies depending on your system. Refer to the
32+ [ PHP installation and configuration documentation] ( http://php.net/manual/en/install.php )
33+ for detailed instructions.
34+
35+ 1 . Install [ Composer] ( https://getcomposer.org/download/ ) .
36+
37+ Composer is a dependency manager for PHP, and is required to isntall and use
38+ OpenCensus for PHP.
39+
40+ 1 . Install the project dependencies.
41+
42+ ``` sh
43+ $ composer install
44+ ```
45+
46+ # # Tests
47+
48+ Tests are a very important part of OpenCensus for PHP. All contributions should
49+ include tests that ensure the contributed code behaves as expected.
50+
51+ To run all tests, the following command may be invoked:
52+
53+ ` ` ` sh
54+ $ composer tests
55+ ` ` `
56+
57+ # # Coding Style
58+
59+ Please follow the established coding style in the library. OpenCensus for PHP
60+ follows the [PSR-2](https://www.php-fig.org/psr/psr-2/) Coding Style.
61+
62+ You can check your code against these rules by running PHPCS with the proper
63+ ruleset, like this:
64+
65+ ` ` ` sh
66+ $ vendor/bin/phpcs --standard=phpcs-ruleset
67+ ` ` `
68+
69+ Coding style checks are run along with the other test suites.
0 commit comments