Download the PHP package covergenius/xcover-php without Composer
On this page you can find all versions of the php package covergenius/xcover-php. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download covergenius/xcover-php
More information about covergenius/xcover-php
Files in covergenius/xcover-php
Package xcover-php
Short Description XCover API SDK for PHP
License MIT
Homepage https://www.covergenius.com/xcover/
Informations about the package xcover-php
XCover SDK for PHP
XCover SDK simplifies XCover API integration in PHP applications.
The library is based on Guzzle 7 HTTP client and offers the following features:
- AuthMiddleware performs authentication
- JsonResponseMiddleware provides convenient
json
method on the Guzzle responses - HTTP abstraction in XCover class
- Automatic response status code validation and custom exception classes
Installation
XCover SDK is available on Packagist and the recommended way of installing it is via Composer.
V1 releases are for PHP 7.2 or higher (but less than 8)
V2 releases are for PHP 7.4 as well as 8.0 and higher
Usage
Basic usage
Please refer to tests/XCoverTest.php
file for more examples.
XCover class provides methods for all operations listed in XCover API Documentation.
Customising Guzzle client
To customise Guzzle configuration you can pass custom client instance in XCover constructor.
Guzzle 6 client instance is immutable so you need to prepare it beforehand and add all mandatory config options, e.g:
It is also possible to extend XCover Class and override createDefaultClient
function.
TODO
There are a few features which we will add in the future releases:
- Async calls using Guzzle's promises
- CircuitBreaker middleware
- BYO HTTP Client
Testing
PHPUnit with PHP-VCR are used to run tests.
Tests are run on every push and pull request to the repository.
Run the below command to run tests
Code Style
PHP_CodeSniffer is used for coding standard. We currently follow PSR-1 and PSR-2 as a standard.
Lint checks are run on every push and pull request.
Run the below command to check for any code style issues.
You can view the php-cs rules at phpcs.xml
Static Analysis
PHPStan is used for static analysis of code. PHPStan is a PHP Static Analysis Tool. PHPStan focuses on finding errors in your code without actually running it. It catches whole classes of bugs even before you write tests for the code.
Static Analysis is run on every push and pull request
run the command below to check the code with PHPStan
Changelog
You can view the changelog at CHANGELOG.md
Security
You can iew the security policy at SECURITY.md
Licence
You can view license information at LICENSE
All versions of xcover-php with dependencies
guzzlehttp/guzzle Version ^7.2
ext-json Version *
ext-mbstring Version *