testmonitor / mantis-client
The TestMonitor Mantis Client.
Installs: 8 436
Dependents: 0
Suggesters: 0
Security: 0
Stars: 2
Watchers: 3
Forks: 3
Open Issues: 0
Requires
- php: ^8.1
- ext-json: *
- guzzlehttp/guzzle: ^6.4|^7.0
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.1
- mockery/mockery: ~1.0
- phpunit/phpunit: ^10.0
- scrutinizer/ocular: ^1.9
- squizlabs/php_codesniffer: ^3.7
README
This package provides a very basic, convenient, and unified wrapper for the Mantis REST API.
Table of Contents
Installation
To install the client you need to require the package using composer:
$ composer require testmonitor/mantis-client
Use composer's autoload:
require __DIR__.'/../vendor/autoload.php';
You're all set up now!
Usage
You'll have to instantiate the client using your credentials:
$mantis = new \TestMonitor\Mantis\Client('https://instance-name.mantishub.io', 'REST token');
Next, you can start interacting with Mantis.
Examples
Get a list of Mantis projects:
$projects = $mantis->projects();
Or creating an issue, for example (using category 'Bug' and project 1):
$issue = $mantis->createIssue(new \TestMonitor\Mantis\Resources\Issue([ 'summary' => 'Some issue', 'description' => 'A better description', 'category' => 'Bug', ]), '1');
Tests
The package contains integration tests. You can run them using PHPUnit.
$ vendor/bin/phpunit
Changelog
Refer to CHANGELOG for more information.
Contributing
Refer to CONTRIBUTING for contributing details.
Credits
- Thijs Kok - Lead developer - ThijsKok
- Stephan Grootveld - Developer - Stefanius
- Frank Keulen - Developer - FrankIsGek
- Muriel Nooder - Developer - ThaNoodle
License
The MIT License (MIT). Refer to the License for more information.