PHPackages                             testmonitor/devops-client - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. testmonitor/devops-client

ActiveLibrary[API Development](/categories/api)

testmonitor/devops-client
=========================

The TestMonitor Azure DevOps Client.

v2.2.0(1y ago)49.7k↓50%4MITPHPPHP ^8.1

Since Dec 8Pushed 6mo ago2 watchersCompare

[ Source](https://github.com/testmonitor/devops-client)[ Packagist](https://packagist.org/packages/testmonitor/devops-client)[ RSS](/packages/testmonitor-devops-client/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (7)Versions (12)Used By (0)

TestMonitor Azure DevOps Client
===============================

[](#testmonitor-azure-devops-client)

[![Latest Stable Version](https://camo.githubusercontent.com/3a9fd05e7447b48c3eeec8f7b786e1d882e5a04413e9df055d82d9d4e6c40322/68747470733a2f2f706f7365722e707567782e6f72672f746573746d6f6e69746f722f6465766f70732d636c69656e742f762f737461626c65)](https://packagist.org/packages/testmonitor/devops-client)[![CircleCI](https://camo.githubusercontent.com/06698196ad8ff5d19ac2cf5b9fabc5d200a380a10eb9b5a4b8a6d76d60d39f42/68747470733a2f2f696d672e736869656c64732e696f2f636972636c6563692f70726f6a6563742f6769746875622f746573746d6f6e69746f722f6465766f70732d636c69656e742e737667)](https://circleci.com/gh/testmonitor/devops-client)[![StyleCI](https://camo.githubusercontent.com/81a527af296691756023fef7cb778db2dd68783be59feefdc83b732fa75a5306/68747470733a2f2f7374796c6563692e696f2f7265706f732f3232333937333935302f736869656c64)](https://styleci.io/repos/223973950)[![codecov](https://camo.githubusercontent.com/7c981ded851feed92b477ea107077df0e7771c72d62f20f150d9d45642a70700/68747470733a2f2f636f6465636f762e696f2f67682f746573746d6f6e69746f722f6465766f70732d636c69656e742f67726170682f62616467652e7376673f746f6b656e3d4f583630395930494a59)](https://codecov.io/gh/testmonitor/devops-client)[![License](https://camo.githubusercontent.com/7c85e805f3911da80cf0453a4ed95166c83fef6f5bee0e6c28fcf6ccf49a86da/68747470733a2f2f706f7365722e707567782e6f72672f746573746d6f6e69746f722f6465766f70732d636c69656e742f6c6963656e7365)](https://packagist.org/packages/testmonitor/devops-client)

This package provides a very basic, convenient, and unified wrapper for [Microsoft Azure DevOps](https://azure.microsoft.com/en-us/services/devops/).

Table of Contents
-----------------

[](#table-of-contents)

- [Installation](#installation)
- [Usage](#usage)
- [Examples](#examples)
- [Tests](#tests)
- [Changelog](#changelog)
- [Contributing](#contributing)
- [Credits](#credits)
- [License](#license)

Installation
------------

[](#installation)

To install the client you need to require the package using composer:

```
$ composer require testmonitor/devops-client

```

Use composer's autoload:

```
require __DIR__.'/../vendor/autoload.php';
```

You're all set up now!

Usage
-----

[](#usage)

This client only supports **oAuth authentication**. You'll need an Microsoft Entra ID OAuth app to proceed. If you haven't done so, please read up with the [Azure DevOps authentication docs](https://docs.microsoft.com/en-us/azure/devops/integrate/get-started/authentication/oauth?view=azure-devops)on how to create an application and set the correct permissions.

When your OAuth app is up and running, start with the oAuth authorization:

```
$oauth = [
    'clientId' => '12345',
    'clientSecret' => 'abcdef',
    'appId' => '12345',
    'redirectUrl' => 'https://redirect.myapp.com/',
];

$devops = new \TestMonitor\DevOps\Client($oauth);

header('Location: ' . $devops->authorizationUrl());
exit();
```

This will redirect the user to a page asking confirmation for your app getting access to Azure DevOps. Make sure your redirectUrl points back to your app. This URL should point to the following code:

```
$oauth = [
    'clientId' => '12345',
    'clientSecret' => 'abcdef',
    'appId' => '12345',
    'redirectUrl' => 'https://redirect.myapp.com/',
];

$devops = new \TestMonitor\DevOps\Client($oauth);

$token = $devops->fetchToken($_REQUEST['code']);
```

When everything went ok, you should have an access token (available through Token object). It will be valid for **one hour**. After that, you'll have to refresh the token to regain access:

```
$oauth = ['clientId' => '12345', 'clientSecret' => 'abcdef', 'appId' => '12345', 'redirectUrl' => 'https://redirect.myapp.com/'];
$token = new \TestMonitor\DevOps\AccessToken('eyJ0...', '0/34ccc...', 1574601877); // the token you got last time
$organization = 'MyOrg';

$devops = new \TestMonitor\DevOps\Client($oauth, $organization, $token);

if ($token->expired()) {
    $newToken = $devops->refreshToken();
}
```

The new token will be valid again for the next hour.

Examples
--------

[](#examples)

Get a list of Azure DevOps accounts:

```
$accounts = $devops->accounts();
```

Or creating a work item, for example (using a work item type 'Bug' and example project with id 12345):

```
$workItem = $devops->createWorkItem(new \TestMonitor\DevOps\Resources\WorkItem([
    'title' => 'Summary of the item',
    'description' => 'Some description',
    'workItemType' => 'Bug',
    'stepsToReproduce' => 'Repro steps',
]), '12345');
```

Tests
-----

[](#tests)

The package contains integration tests. You can run them using PHPUnit.

```
$ vendor/bin/phpunit

```

Changelog
---------

[](#changelog)

Refer to [CHANGELOG](CHANGELOG.md) for more information.

Contributing
------------

[](#contributing)

Refer to [CONTRIBUTING](CONTRIBUTING.md) for contributing details.

Credits
-------

[](#credits)

- **Thijs Kok** - *Lead developer* - [ThijsKok](https://github.com/thijskok)
- **Stephan Grootveld** - *Developer* - [Stefanius](https://github.com/stefanius)
- **Frank Keulen** - *Developer* - [FrankIsGek](https://github.com/frankisgek)
- **Muriel Nooder** - *Developer* - [ThaNoodle](https://github.com/thanoodle)

License
-------

[](#license)

The MIT License (MIT). Refer to the [License](LICENSE.md) for more information.

###  Health Score

45

—

FairBetter than 93% of packages

Maintenance51

Moderate activity, may be stable

Popularity28

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity73

Established project with proven stability

 Bus Factor1

Top contributor holds 74.6% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~185 days

Recently: every ~101 days

Total

10

Last Release

686d ago

Major Versions

v1.6.0 → v2.0.02024-04-10

PHP version history (4 changes)v1.0.0PHP ^7.2

v1.2.0PHP ^7.4|^8.0

v1.4.0PHP ^8.0

v2.0.0PHP ^8.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/39f48c881813b7d3b044ca5660aa5ab9e60b5dd7c34ed4a47acbb11bd20b7593?d=identicon)[thijskok](/maintainers/thijskok)

---

Top Contributors

[![thijskok](https://avatars.githubusercontent.com/u/1344550?v=4)](https://github.com/thijskok "thijskok (88 commits)")[![stefanius](https://avatars.githubusercontent.com/u/2707905?v=4)](https://github.com/stefanius "stefanius (20 commits)")[![Frankisgek](https://avatars.githubusercontent.com/u/487218?v=4)](https://github.com/Frankisgek "Frankisgek (8 commits)")[![StyleCIBot](https://avatars.githubusercontent.com/u/11048387?v=4)](https://github.com/StyleCIBot "StyleCIBot (2 commits)")

---

Tags

apiazure-devopsclientclientazuredevopstestmonitor

###  Code Quality

TestsPHPUnit

Code StylePHP CS Fixer

### Embed Badge

![Health badge](/badges/testmonitor-devops-client/health.svg)

```
[![Health](https://phpackages.com/badges/testmonitor-devops-client/health.svg)](https://phpackages.com/packages/testmonitor-devops-client)
```

###  Alternatives

[openai-php/laravel

OpenAI PHP for Laravel is a supercharged PHP API client that allows you to interact with the Open AI API

3.7k7.6M74](/packages/openai-php-laravel)[resend/resend-php

Resend PHP library.

574.7M21](/packages/resend-resend-php)[crowdin/crowdin-api-client

PHP client library for Crowdin API v2

611.5M5](/packages/crowdin-crowdin-api-client)[mozex/anthropic-laravel

Anthropic PHP for Laravel is a supercharged PHP API client that allows you to interact with the Anthropic API

71226.4k1](/packages/mozex-anthropic-laravel)[markrogoyski/numverify-api-client-php

Numverify API Client for PHP

1220.9k](/packages/markrogoyski-numverify-api-client-php)[spinen/laravel-clickup

SPINEN's Laravel Package for ClickUp.

282.2k](/packages/spinen-laravel-clickup)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
