2017 © Pedro Peláez
 

library sdk

Wizaplace's PHP SDK

image

wizaplace/sdk

Wizaplace's PHP SDK

  • Thursday, July 26, 2018
  • by mnapoli
  • Repository
  • 6 Watchers
  • 5 Stars
  • 9,872 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 0 Forks
  • 2 Open issues
  • 100 Versions
  • 25 % Grown

The README.md

Installation

composer require wizaplace/sdk

Usage

You can find some small examples there: Wizaplace\SDK\Tests\ExampleTest, (*1)

Development

Running linters and tests

With Docker

./docker-make all

Directly on your machine

Requires Make, Composer, and all dependencies defined in composer.json., (*2)

composer install
make all

To run a single test, run the following command:, (*3)

vendor/bin/phpunit --debug --verbose tests/PathToTestClass/MyServiceTest.php --filter testMyFunction

When you run the test testMyFunction() of the file MyServiceTest.php, a cassette at the format testMyFunction.yml will be generated in the directory MyServiceTest. Everytime you want to reload the test, you will have to delete the cassette., (*4)

php-vcr behaviour

Any changes to an API call in a tested method will make regenerate the cassette files (this needs the tests to be run twice). Those changes need to be committed alongside your code., (*5)

Deployment

When master is ready to be deployed on Packagist.org:, (*6)

  • Go to the releases page on Github
  • Click on "Draft a new release"
  • Choose a new tag following semver (e.g. 1.30.1)
  • Change the target to master
  • Set the release title to "Release {version}" (e.g. "Release 1.30.1")
  • Copy the relevant section of the Changelog in the release description, or if the version is a patch, just write the list of fixes in a list
  • Click on "Publish release"
  • Check that the version is published on Packagist

The Versions