PHPackages                             spirit-dev/php-sonarqube-api - 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. spirit-dev/php-sonarqube-api

AbandonedArchivedLibrary[API Development](/categories/api)

spirit-dev/php-sonarqube-api
============================

SonarQube API client for php projects

0.0.4(9y ago)43.0k83GPL v3PHPPHP &gt;=5.3.2

Since Feb 9Pushed 8y agoCompare

[ Source](https://github.com/spirit-dev/php-sonarqube-api)[ Packagist](https://packagist.org/packages/spirit-dev/php-sonarqube-api)[ Docs](https://github.com/spirit-dev/php-sonarqube-api)[ RSS](/packages/spirit-dev-php-sonarqube-api/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (1)Versions (7)Used By (3)

-- Under development --
=======================

[](#---under-development---)

A PHP wrapper for use with the [SonarQube](http://docs.sonarqube.org/display/DEV/Web+Service+API).
==================================================================================================

[](#a-php-wrapper-for-use-with-the-sonarqube)

Based on [php-sonarqube-api](https://github.com/spirit-dev/php-sonarqube-api).

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

[](#installation)

Install Composer

```
$ curl -sS https://getcomposer.org/installer | php
$ sudo mv composer.phar /usr/local/bin/composer

```

Add the following to your require block in composer.json config. Note: be careful when using the `dev-master` tag as this may have unexpected results depending on your version of SonarQube.

```
"spirit-dev/php-sonarqube-api": "dev-master"

```

Include Composer's autoloader:

```
require_once dirname(__DIR__).'/vendor/autoload.php';
```

General API Usage
-----------------

[](#general-api-usage)

```
$client = new \SonarQube\Client('http://sonar.domain.com/api/', 'username', 'password'); // change here
$authentication = $client->api('authentication')->validate();
$projects = $client->projects->search(['search'=>'XYZ']);
$measures = $client->measures->component(['componentKey'=>'ABC.XYZ','metricKeys'=>'ncloc_language_distribution,complexity,violations']);
```

Calls can be made either via `$client->api('apiSection')->endpoint()` or as a property: `$client->apiSection->endpoint()`. The two syntaxes work identically.

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

[](#contributing)

This project is currently under development. Many part of SonarQube official API are not parts of this project. Feel free to fork this project, apply modifications and sending me you pull requests.

###  Health Score

30

—

LowBetter than 62% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity24

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity52

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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 ~51 days

Total

5

Last Release

3588d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/e6991e99e84933de308536a6310e594be16d4dbf8d8c92fae3305b8791ecf497?d=identicon)[spirit-dev](/maintainers/spirit-dev)

---

Top Contributors

[![jbordat-jb](https://avatars.githubusercontent.com/u/44842294?v=4)](https://github.com/jbordat-jb "jbordat-jb (27 commits)")

---

Tags

apisonarqubesonar

### Embed Badge

![Health badge](/badges/spirit-dev-php-sonarqube-api/health.svg)

```
[![Health](https://phpackages.com/badges/spirit-dev-php-sonarqube-api/health.svg)](https://phpackages.com/packages/spirit-dev-php-sonarqube-api)
```

###  Alternatives

[gorkalaucirica/hipchat-v2-api-client

Hipchat v2 API client

80226.6k6](/packages/gorkalaucirica-hipchat-v2-api-client)[webit/w-firma-api

wFirma.pl API

1821.5k](/packages/webit-w-firma-api)

PHPackages © 2026

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