Skip to content

Latest commit

 

History

History
53 lines (38 loc) · 2.49 KB

CONTRIBUTING.md

File metadata and controls

53 lines (38 loc) · 2.49 KB

Contributing

How to contribute

Getting Started

  1. Clone repository or your fork locally
  2. Install sdk dependencies including dev with the following command composer install
  3. Check that the current tests pass with the following command php vendor/bin/phpunit

Making Changes

  1. Create feature branch
  2. Make changes. Please make sure that you don't break backward compatibility
  3. Add unit tests. Also add integration tests if needed
  4. Add new section to CHANGELOG.md with clear description. Please follow keepachangelog.com guide.
  5. Run php vendor/bin/php-cs-fixer fix . --allow-risky=yes before commit
  6. Run tests before commit php vendor/bin/phpunit
  7. Commit changes. Please use description of your patch from CHANGELOG.md for commit message.

Submitting Changes

  1. Push your changes to a feature branch
  2. Submit a pull request
  3. Assign pull request to one of core team members

Add new API command to client

  1. Add new command to guzzle3 service description config in src/API/Resources/api.php
  2. Add phpDocumentor DocBlocks with new methods to src/API/XsollaClient.php
  3. Add new tests to tests/Integration/API/

Release a new version

How to choose right version number

Version name should be in the following format vMAJOR.MINOR.PATCH

Please follow semver.org convention for new version choosing. If new changes don't contain new valuable features for end users or urgent bug fixes, then the new release is not needed.

Release process

  1. Merge all needed pull requests to master branch
    1. Change version in src/Version.php
    2. Set new version number instead Unreleased section name in CHANGELOG.md. Add New Unreleased section to top of the CHANGELOG.md file
  2. Create tag with version "vMAJOR.MINOR.PATCH" and push it (tag must be linked to merge commit)
  3. Review diff between new released version and master branch, include CHANGELOG.md
  4. Create new release at github
    1. Create new release draft with version name
    2. Copy release description from changelog
    3. Run php build/packager.php locally
    4. Attach to release xsolla.zip, xsolla.phar from build/artifacts