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

ActiveLibrary[API Development](/categories/api)

futuretek/php-gitlab-api
========================

GitLab API client

9.13.1(6y ago)08MITPHPPHP ^5.6 || ^7.0

Since Jun 18Pushed 6y agoCompare

[ Source](https://github.com/futuretek-solutions-ltd/php-gitlab-api)[ Packagist](https://packagist.org/packages/futuretek/php-gitlab-api)[ Docs](https://github.com/m4tthumphrey/php-gitlab-api)[ RSS](/packages/futuretek-php-gitlab-api/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependencies (9)Versions (43)Used By (0)

A PHP wrapper to be used with [Gitlab's API](https://github.com/gitlabhq/gitlabhq/tree/master/doc/api).
=======================================================================================================

[](#a-php-wrapper-to-be-used-with-gitlabs-api)

[![Build Status](https://camo.githubusercontent.com/eeed2c3d2f8f293ec78f1eea11f1260df769367ddd628a673cecea6e88501e10/68747470733a2f2f7472617669732d63692e6f72672f6d34747468756d70687265792f7068702d6769746c61622d6170692e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/m4tthumphrey/php-gitlab-api)[![StyleCI](https://camo.githubusercontent.com/4df5b5ef7afa1d370cf379a38b56815e8b14fbd672dee5189e2a2550643fb738/68747470733a2f2f7374796c6563692e696f2f7265706f732f363831363333352f736869656c643f6272616e63683d6d6173746572)](https://styleci.io/repos/6816335)[![Total Downloads](https://camo.githubusercontent.com/3ce7aaf2bf9bf1ac6d3bc88bc6b43e0e253b72936c6195263a905ea91351be80/68747470733a2f2f706f7365722e707567782e6f72672f6d34747468756d70687265792f7068702d6769746c61622d6170692f646f776e6c6f6164733f666f726d61743d666c61742d737175617265)](https://packagist.org/packages/m4tthumphrey/php-gitlab-api)[![Latest Stable Version](https://camo.githubusercontent.com/b7b4a02d5b5c1d6e409daaafc236a1d33c61eca51a112049ed872055bb839940/68747470733a2f2f706f7365722e707567782e6f72672f6d34747468756d70687265792f7068702d6769746c61622d6170692f76657273696f6e3f666f726d61743d666c61742d737175617265)](https://packagist.org/packages/m4tthumphrey/php-gitlab-api)[![Latest Unstable Version](https://camo.githubusercontent.com/5e13f862339fb1a02dd268e420504c6ad4d4e1889c73633a8d5f2d1c15e000ba/68747470733a2f2f706f7365722e707567782e6f72672f6d34747468756d70687265792f7068702d6769746c61622d6170692f762f756e737461626c653f666f726d61743d666c61742d737175617265)](//packagist.org/packages/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)

Via [composer](https://getcomposer.org)

```
composer require m4tthumphrey/php-gitlab-api php-http/guzzle6-adapter:^1.0
```

Why `php-http/guzzle6-adapter`? We are decoupled from any HTTP messaging client with help by [HTTPlug](http://httplug.io).

You can visit [HTTPlug for library users](http://docs.php-http.org/en/latest/httplug/users.html) to get more information about installing HTTPlug related packages.

Versioning
----------

[](#versioning)

Depending on your Gitlab server version, you must choose the right version of this library. Please refer to the following table to pick the right one.

VersionGitlab API VersionGitlab Version9.xV4&gt;= 9.08.xV3&lt; 9.5General API Usage
-----------------

[](#general-api-usage)

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

// or for OAuth2 (see https://github.com/m4tthumphrey/php-gitlab-api/blob/master/lib/Gitlab/HttpClient/Plugin/Authentication.php#L47)
$client = \Gitlab\Client::create('http://gitlab.yourdomain.com')
    ->authenticate('your_gitlab_token_here', \Gitlab\Client::AUTH_OAUTH_TOKEN)
;

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

Example with Pager
------------------

[](#example-with-pager)

to fetch all your closed issue with pagination ( on the gitlab api )

```
$client = \Gitlab\Client::create('http://git.yourdomain.com')
    ->authenticate('your_gitlab_token_here', \Gitlab\Client::AUTH_URL_TOKEN)
;
$pager = new \Gitlab\ResultPager($client);
$issues = $pager->fetchAll($client->api('issues'),'all',[null, ['state' => 'closed']]);
```

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

[](#model-usage)

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

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

# 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 doesn\'t work properly. Please fix.',
  'assignee_id' => 2
));

# Closing that issue
$issue->close();
```

You get the idea! Take a look around ([API methods](https://github.com/m4tthumphrey/php-gitlab-api/tree/master/lib/Gitlab/Api), [models](https://github.com/m4tthumphrey/php-gitlab-api/tree/master/lib/Gitlab/Model)) 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

Popularity4

Limited adoption so far

Community19

Small or concentrated contributor base

Maturity70

Established project with proven stability

 Bus Factor2

2 contributors hold 50%+ of commits

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 ~56 days

Recently: every ~124 days

Total

42

Last Release

2395d ago

Major Versions

0.7.1 → 6.0.02013-08-28

6.9.1 → 7.8.02015-02-23

7.15.0 → 8.0.x-dev2017-06-06

v4.x-dev → 9.0.0-beta12017-08-03

PHP version history (2 changes)0.6.0PHP &gt;=5.3.2

v4.x-devPHP ^5.6 || ^7.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/1ce67c863775f4dd7237db0547fe39aaf85c9841f34773d67e88f62dcf948ae4?d=identicon)[futuretek](/maintainers/futuretek)

---

Top Contributors

[![m4tthumphrey](https://avatars.githubusercontent.com/u/582971?v=4)](https://github.com/m4tthumphrey "m4tthumphrey (169 commits)")[![fbourigault](https://avatars.githubusercontent.com/u/1116116?v=4)](https://github.com/fbourigault "fbourigault (110 commits)")[![m1guelpf](https://avatars.githubusercontent.com/u/23558090?v=4)](https://github.com/m1guelpf "m1guelpf (23 commits)")[![drumm](https://avatars.githubusercontent.com/u/39292?v=4)](https://github.com/drumm "drumm (18 commits)")[![tobiasetter](https://avatars.githubusercontent.com/u/24449919?v=4)](https://github.com/tobiasetter "tobiasetter (15 commits)")[![gaooulong](https://avatars.githubusercontent.com/u/128565219?v=4)](https://github.com/gaooulong "gaooulong (13 commits)")[![Artistan](https://avatars.githubusercontent.com/u/801349?v=4)](https://github.com/Artistan "Artistan (12 commits)")[![GrahamCampbell](https://avatars.githubusercontent.com/u/2829600?v=4)](https://github.com/GrahamCampbell "GrahamCampbell (11 commits)")[![jubianchi](https://avatars.githubusercontent.com/u/327237?v=4)](https://github.com/jubianchi "jubianchi (11 commits)")[![sidneymarieanne](https://avatars.githubusercontent.com/u/23741257?v=4)](https://github.com/sidneymarieanne "sidneymarieanne (11 commits)")[![radutopala](https://avatars.githubusercontent.com/u/647137?v=4)](https://github.com/radutopala "radutopala (9 commits)")[![omarlopesino](https://avatars.githubusercontent.com/u/3202817?v=4)](https://github.com/omarlopesino "omarlopesino (9 commits)")[![violuke](https://avatars.githubusercontent.com/u/6420347?v=4)](https://github.com/violuke "violuke (7 commits)")[![gilmiriam](https://avatars.githubusercontent.com/u/26138458?v=4)](https://github.com/gilmiriam "gilmiriam (7 commits)")[![jdecool](https://avatars.githubusercontent.com/u/433926?v=4)](https://github.com/jdecool "jdecool (6 commits)")[![glaubinix](https://avatars.githubusercontent.com/u/442056?v=4)](https://github.com/glaubinix "glaubinix (6 commits)")[![laurenzgamper](https://avatars.githubusercontent.com/u/2470546?v=4)](https://github.com/laurenzgamper "laurenzgamper (5 commits)")[![moufmouf](https://avatars.githubusercontent.com/u/1290952?v=4)](https://github.com/moufmouf "moufmouf (5 commits)")[![vinkla](https://avatars.githubusercontent.com/u/499192?v=4)](https://github.com/vinkla "vinkla (5 commits)")[![donkidd](https://avatars.githubusercontent.com/u/325242?v=4)](https://github.com/donkidd "donkidd (4 commits)")

---

Tags

apigitlab

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[m4tthumphrey/php-gitlab-api

GitLab API v4 client for PHP

9485.4M64](/packages/m4tthumphrey-php-gitlab-api)[knplabs/github-api

GitHub API v3 client

2.2k15.8M187](/packages/knplabs-github-api)[jolicode/slack-php-api

An up to date PHP client for Slack's API

2534.4M12](/packages/jolicode-slack-php-api)[theodo-group/llphant

LLPhant is a library to help you build Generative AI applications.

1.5k311.5k5](/packages/theodo-group-llphant)[deeplcom/deepl-php

Official DeepL API Client Library

2616.2M66](/packages/deeplcom-deepl-php)[darthsoup/php-whmcs-api

WHMCS API client for PHP

2317.3k4](/packages/darthsoup-php-whmcs-api)

PHPackages © 2026

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