Skip to content

Latest commit

 

History

History
57 lines (33 loc) · 2.82 KB

CONTRIBUTING.md

File metadata and controls

57 lines (33 loc) · 2.82 KB

Contributing to Facebook Instant Articles PHP SDK

We want to make contributing to this project as easy and transparent as possible.

We accept contributions via pull requests on GitHub.

Code of Conduct

The code of conduct is described in CODE_OF_CONDUCT.md

Pull Requests

  • Sign the CLA - In order to accept your pull request, we need you to submit a Contributor License Agreement. You only need to do this once to work on any of Facebook's open source projects.

  • PSR-2 Coding Standard - The easiest way to apply the conventions is to run PHP Code Sniffer as you code.

  • Add tests - If you've added code that can be tested, add tests.

  • Document any change in behaviour - Make sure the README file is updated in your PR. Include any notes for documentation items which needs to be updated on the main docs on Facebook's Developer site.

  • Consider our release cycle - We try to follow SemVer. Randomly breaking public APIs is not an option.

  • Create topic branches - Don't ask us to pull from your master branch.

  • One pull request per feature - If you want to do more than one thing, send multiple pull requests.

  • Send coherent history - Make sure each individual commit in your pull request is meaningful. If you had to make multiple intermediate commits while developing, please squash them before submitting.

  • Ensure tests pass! - Please run the tests before submitting your pull request, and make sure they pass. We won't accept a patch until all tests pass.

  • Ensure no coding standards violations - Please run PHP Code Sniffer using the PSR-2 standard before submitting your pull request. A violation will cause the build to fail, so please make sure there are no violations. We can't accept a patch if the build fails.

Issues

We use GitHub issues to track public bugs. Please ensure your description is clear and has sufficient instructions to be able to reproduce the issue.

Running Tests

$ ./vendor/bin/phpunit

When doing a pull request, consider if this diff has a testcase that was covered in a wrong way or if it needs a new test case.

Running PHP Code Sniffer

Run Code Sniffer against the src/ and tests/ directories.

$ vendor/bin/phpcs --standard=phpcs.xml -p

Give a try for the autofixer for code style

$ vendor/bin/phpcbf --standard-phpcs.xml -p

Happy coding!