PHPackages                             fgrosse/gitlab-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. fgrosse/gitlab-api

AbandonedArchivedLibrary[API Development](/categories/api)

fgrosse/gitlab-api
==================

A guzzle 5 client for the gitlab API using service descriptions

0.9.0(10y ago)5351MITPHPPHP &gt;= 5.5

Since Sep 28Pushed 10y ago2 watchersCompare

[ Source](https://github.com/fgrosse/gitlab-api)[ Packagist](https://packagist.org/packages/fgrosse/gitlab-api)[ Docs](https://github.com/fgrosse/gitlab-api)[ RSS](/packages/fgrosse-gitlab-api/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (4)Versions (2)Used By (0)

### PHP Gitlab API

[](#php-gitlab-api)

[![Build Status](https://camo.githubusercontent.com/f75176678fc59171ca7bebd0a4f9e82cee226ba61161b099d7e023a34e9118f7/68747470733a2f2f7365637572652e7472617669732d63692e6f72672f6667726f7373652f6769746c61622d6170692e706e673f6272616e63683d6d6173746572)](http://travis-ci.org/fgrosse/gitlab-api)[![HHVM Status](https://camo.githubusercontent.com/a66aa4fe26081477ae36ffb53d35e0d0159dd0cb0cff67fdccb036f113366991/687474703a2f2f6868766d2e683463632e64652f62616467652f6667726f7373652f6769746c61622d6170692e706e67)](http://hhvm.h4cc.de/package/fgrosse/gitlab-api)[![PHP 7 ready](https://camo.githubusercontent.com/1b14d2dd813e0eb97a426c8ea14891d9af96030f7be4b8edaac652c6a4e5be70/687474703a2f2f7068703772656164792e74696d6573706c696e7465722e63682f6667726f7373652f6769746c61622d6170692f62616467652e737667)](https://travis-ci.org/fgrosse/gitlab-api)[![Coverage Status](https://camo.githubusercontent.com/05a4038bcff76bc44d655e510a9eb121154b9b568b7444207eaf6929710f7e88/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6667726f7373652f6769746c61622d6170692f62616467652e7376673f6272616e63683d6d617374657226736572766963653d676974687562)](https://coveralls.io/github/fgrosse/gitlab-api?branch=master)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/b8ab48ea65ef53ff975a208fbe8cdd3c2b981524278cc6623f703ce9790b9707/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6667726f7373652f6769746c61622d6170692f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/fgrosse/gitlab-api/?branch=master)

[![Latest Stable Version](https://camo.githubusercontent.com/b7cf00e31f642cbdcf862410002bba4abdb36c20992cf738e92c5021b7ffaa69/68747470733a2f2f706f7365722e707567782e6f72672f6667726f7373652f6769746c61622d6170692f762f737461626c652e706e67)](https://packagist.org/packages/fgrosse/gitlab-api)[![Latest Unstable Version](https://camo.githubusercontent.com/d4c016e2cb213a9e0f748dd2d933e01ed36a259ca9032059b79ad6117bfd4463/68747470733a2f2f706f7365722e707567782e6f72672f6667726f7373652f6769746c61622d6170692f762f756e737461626c652e706e67)](https://packagist.org/packages/fgrosse/gitlab-api)[![License](https://camo.githubusercontent.com/9f7de5a5d9f3e9e92994c2e43c6b9164af28cd28ddbf27afefe9671b3c45273a/68747470733a2f2f706f7365722e707567782e6f72672f6667726f7373652f6769746c61622d6170692f6c6963656e73652e706e67)](https://packagist.org/packages/fgrosse/gitlab-api)

This is a php client for the [gitlab](https://about.gitlab.com/) API. This client bases on Guzzle 5 with service descriptions. You can have a quick overview of the implemented gitlab APIs in the yml files in [lib/Client/ServiceDescription](lib/Client/ServiceDescription).

### Implemented APIs (Gitlab ~7.7)

[](#implemented-apis-gitlab-77)

- [Commits](lib/Client/ServiceDescription/commits_api.yml)
- [Issues](lib/Client/ServiceDescription/issues_api.yml)
- [Merge Requests](lib/Client/ServiceDescription/merge_requests_api.yml)
- [Labels](lib/Client/ServiceDescription/labels_api.yml)

Dependencies
------------

[](#dependencies)

Gitlab-api requires at least `PHP 5.5` and also been successfully tested using `PHP 7` and `HHVM`. Furthermore the whole client is build upon the awesome [Guzzle Services](https://github.com/guzzle/guzzle-services) by [Michael Dowling](https://github.com/mtdowling).

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

[](#installation)

The preferred way to install this library is to rely on [Composer](https://getcomposer.org/):

```
$ composer require fgrosse/gitlab-api
```

Usage
-----

[](#usage)

The API is still work in progress and the actual usage might change in the future.

The stable part of this API is available through the [GitlabClient interface](lib/Client/GitlabClient.php):

```
$guzzleClient = GitlabGuzzleClient::factory([
    'base_url'  => $baseUrl,
    'api_token' => $token,
]);

$client = new HttpGitlabClient($guzzleClient);

$mergeRequests = $client->listMergeRequests($project,
    $state='closed',
    $order='updated_at',
    $sort='asc',
    $page=1, $perPage=5
);
```

If you want to access more functionality consider using the `GitlabClient` directly:

```
$client = GitlabClient::factory([
    'base_url'  => $baseUrl,
    'api_token' => $token,
]);

$mergeRequests = $client->listMergeRequests([
    'project_id' => $project,
    'state'      => 'closed',
    'order_by'   => 'updated_at',
    'sort'       => 'asc',
    'page'       => 0,
    'per_page'   => 5,
]);
```

Checkout the [lib/Client/ServiceDescription](lib/Client/ServiceDescription) to see the available parameters for each API call. An executable example can be found in [examples/merge\_requests/api.php](examples/merge_requests_api.php).

### Not implemented APIs (yet)

[](#not-implemented-apis-yet)

- deploy\_key\_multiple\_projects API
- deploy\_keys API
- groups API
- milestones API
- notes API
- oauth2 API
- project\_snippets API
- projects API
- repositories API
- repository\_files API
- services API
- session API
- system\_hooks API
- users API

License
-------

[](#license)

This library is distributed under the [MIT License](LICENSE).

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity48

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

Unknown

Total

1

Last Release

3885d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/3af80614ab8c82034395d94b0f53321f045acc0fe8da59bfb601b40796dbdbd5?d=identicon)[FGrosse](/maintainers/FGrosse)

---

Top Contributors

[![fgrosse](https://avatars.githubusercontent.com/u/733004?v=4)](https://github.com/fgrosse "fgrosse (52 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/fgrosse-gitlab-api/health.svg)

```
[![Health](https://phpackages.com/badges/fgrosse-gitlab-api/health.svg)](https://phpackages.com/packages/fgrosse-gitlab-api)
```

###  Alternatives

[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.4k5.6M651](/packages/sylius-sylius)[darkaonline/l5-swagger

OpenApi or Swagger integration to Laravel

2.9k34.0M112](/packages/darkaonline-l5-swagger)[statamic/cms

The Statamic CMS Core Package

4.8k3.2M720](/packages/statamic-cms)[knuckleswtf/scribe

Generate API documentation for humans from your Laravel codebase.✍

2.3k12.2M45](/packages/knuckleswtf-scribe)

PHPackages © 2026

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