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

ActiveLibrary[API Development](/categories/api)

radutopala/php-gitlab-api
=========================

GitLab API client

7.13.0(10y ago)031MITPHPPHP &gt;=5.3.2

Since Jun 18Pushed 9y ago1 watchersCompare

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

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

A PHP wrapper for use with the [Gitlab API](https://github.com/gitlabhq/gitlabhq/tree/master/doc/api).
======================================================================================================

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

[![Build Status](https://camo.githubusercontent.com/eeed2c3d2f8f293ec78f1eea11f1260df769367ddd628a673cecea6e88501e10/68747470733a2f2f7472617669732d63692e6f72672f6d34747468756d70687265792f7068702d6769746c61622d6170692e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/m4tthumphrey/php-gitlab-api)

Based on [php-github-api](https://github.com/m4tthumphrey/php-github-api) and code from [KnpLabs](https://github.com/KnpLabs/php-github-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 Gitlab. See the Versioning section below for more information.

```
"m4tthumphrey/php-gitlab-api": "dev-master"

```

Include Composer's autoloader:

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

Versioning
----------

[](#versioning)

From the 6.0 stable release of Gitlab, I shall now be matching the client version with the Gitlab version. For example when Gitlab 6.1 is released I will release version 6.1.0 of the API client. If I need to make future updates to the client before the next API version is released. I will simply use a 3th build version. For example `6.1.1`, `6.1.2` etc. It is recommended that you keep your composer file up to date depending on what version of Gitlab you are currently running. So if you are using 6.0, you should required `6.0.*`; 6.1 should be `6.1.*` etc etc.

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

[](#general-api-usage)

```
$client = new \Gitlab\Client('http://git.yourdomain.com/api/v3/'); // change here
$client->authenticate('your_gitlab_token_here', \Gitlab\Client::AUTH_URL_TOKEN); // change here

$project = $client->api('projects')->create('My Project', array(
  'description' => 'This is a project',
  'issues_enabled' => false
));
```

Model Usage
-----------

[](#model-usage)

You can also use the library in an object oriented manner.

```
$client = new \Gitlab\Client('http://git.yourdomain.com/api/v3/'); // change here
$client->authenticate('your_gitlab_token_here', \Gitlab\Client::AUTH_URL_TOKEN); // change here
```

Creating a new project

```
$project = \Gitlab\Model\Project::create($client, 'My Project', array(
  'description' => 'This is my project',
  'issues_enabled' => false
));

$project->addHook('http://mydomain.com/hook/push/1');
```

Creating a new issue

```
$project = new \Gitlab\Model\Project(1, $client);
$issue = $project->createIssue('This does not work..', array(
  'description' => 'This doesnt work properly. Please fix',
  'assignee_id' => 2
));
```

Closing that issue

```
$issue->close();
```

You get the idea! Take a look around and please feel free to report any bugs.

Framework Integrations
----------------------

[](#framework-integrations)

- **Symfony** -
- **Laravel** -

If you have integrated GitLab into a popular PHP framework let us know!

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

[](#contributing)

There are many parts of Gitlab that I have not added to this as it was originally created for personal use, hence the lack of tests. Feel free to fork and add new functionality and tests, I'll gladly accept decent pull requests.

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community18

Small or concentrated contributor base

Maturity67

Established project with proven stability

 Bus Factor1

Top contributor holds 78.4% 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 ~48 days

Recently: every ~38 days

Total

17

Last Release

3944d ago

Major Versions

0.7.1 → 6.0.02013-08-28

6.9.1 → 7.8.02015-02-23

### Community

Maintainers

![](https://www.gravatar.com/avatar/8e36edaf6bcfbf80c9630c62a539bb784e6f338c367479d7b54948e4d4140fad?d=identicon)[radutopala](/maintainers/radutopala)

---

Top Contributors

[![m4tthumphrey](https://avatars.githubusercontent.com/u/582971?v=4)](https://github.com/m4tthumphrey "m4tthumphrey (134 commits)")[![jubianchi](https://avatars.githubusercontent.com/u/327237?v=4)](https://github.com/jubianchi "jubianchi (11 commits)")[![radutopala](https://avatars.githubusercontent.com/u/647137?v=4)](https://github.com/radutopala "radutopala (4 commits)")[![greppy](https://avatars.githubusercontent.com/u/317399?v=4)](https://github.com/greppy "greppy (2 commits)")[![sschwarz](https://avatars.githubusercontent.com/u/286421?v=4)](https://github.com/sschwarz "sschwarz (2 commits)")[![CSchulz](https://avatars.githubusercontent.com/u/1520593?v=4)](https://github.com/CSchulz "CSchulz (2 commits)")[![davidkuridza](https://avatars.githubusercontent.com/u/953796?v=4)](https://github.com/davidkuridza "davidkuridza (2 commits)")[![schneidermichal](https://avatars.githubusercontent.com/u/2735984?v=4)](https://github.com/schneidermichal "schneidermichal (2 commits)")[![shulard](https://avatars.githubusercontent.com/u/482993?v=4)](https://github.com/shulard "shulard (1 commits)")[![stratedge](https://avatars.githubusercontent.com/u/1619065?v=4)](https://github.com/stratedge "stratedge (1 commits)")[![tyler-sommer](https://avatars.githubusercontent.com/u/916259?v=4)](https://github.com/tyler-sommer "tyler-sommer (1 commits)")[![Baldinof](https://avatars.githubusercontent.com/u/1597384?v=4)](https://github.com/Baldinof "Baldinof (1 commits)")[![vinkla](https://avatars.githubusercontent.com/u/499192?v=4)](https://github.com/vinkla "vinkla (1 commits)")[![cheiff](https://avatars.githubusercontent.com/u/2758555?v=4)](https://github.com/cheiff "cheiff (1 commits)")[![dantudor](https://avatars.githubusercontent.com/u/1281127?v=4)](https://github.com/dantudor "dantudor (1 commits)")[![davefarthing](https://avatars.githubusercontent.com/u/2674417?v=4)](https://github.com/davefarthing "davefarthing (1 commits)")[![egon0](https://avatars.githubusercontent.com/u/2273316?v=4)](https://github.com/egon0 "egon0 (1 commits)")[![gonimar](https://avatars.githubusercontent.com/u/756571?v=4)](https://github.com/gonimar "gonimar (1 commits)")[![ivankristianto](https://avatars.githubusercontent.com/u/656006?v=4)](https://github.com/ivankristianto "ivankristianto (1 commits)")[![scottrobertson](https://avatars.githubusercontent.com/u/68361?v=4)](https://github.com/scottrobertson "scottrobertson (1 commits)")

---

Tags

apigitlab

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[m4tthumphrey/php-gitlab-api

GitLab API v4 client for PHP

9485.4M64](/packages/m4tthumphrey-php-gitlab-api)[zeichen32/gitlabapibundle

Symfony Bundle to include the gitlab api.

57417.0k2](/packages/zeichen32-gitlabapibundle)[webit/w-firma-api

wFirma.pl API

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

PHPackages © 2026

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