PHPackages                             fatindeed/gitlab-webhook-handler - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. fatindeed/gitlab-webhook-handler

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

fatindeed/gitlab-webhook-handler
================================

GitLab Webhook Handler

1.0.0(6y ago)09MITPHPPHP &gt;=7.1

Since Jun 18Pushed 6y agoCompare

[ Source](https://github.com/fatindeed/gitlab-webhook-handler)[ Packagist](https://packagist.org/packages/fatindeed/gitlab-webhook-handler)[ Docs](https://packagist.org/packages/fatindeed/gitlab-webhook-handler)[ RSS](/packages/fatindeed-gitlab-webhook-handler/feed)WikiDiscussions master Synced 2d ago

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

GitLab Webhook handler
======================

[](#gitlab-webhook-handler)

[![PHP Version](https://camo.githubusercontent.com/2e03ccf2245af6d04e3f3fc1d15dcaf409823863fa161279a3ca56bb071c9e69/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f666174696e646565642f6769746c61622d776562686f6f6b2d68616e646c65722e737667)](#)[![Latest Version on Packagist](https://camo.githubusercontent.com/afd5bb800ba80023fb3b88fd3949624ca555e446016d037832018e67e4099f6b/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f666174696e646565642f6769746c61622d776562686f6f6b2d68616e646c65722e737667)](https://packagist.org/packages/fatindeed/gitlab-webhook-handler)[![Software License](https://camo.githubusercontent.com/de15de49d3540f2e613a0f51f48de58afba35b63f11fb51453be5d45892cad07/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f666174696e646565642f6769746c61622d776562686f6f6b2d68616e646c65722e737667)](#)[![Build Status](https://camo.githubusercontent.com/3450357c81862f5a07c67f17b4c26116c6ccd03948cd7ffc1d9e4f8e224a084d/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f666174696e646565642f6769746c61622d776562686f6f6b2d68616e646c65722f6d61737465722e737667)](https://travis-ci.org/fatindeed/gitlab-webhook-handler)[![Coverage Status](https://camo.githubusercontent.com/9c9706b7646261f6a1ed70e238a708c5e16150c130fd3736a4e93a612e6ac3cc/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f636f7665726167652f672f666174696e646565642f6769746c61622d776562686f6f6b2d68616e646c65722e737667)](https://scrutinizer-ci.com/g/fatindeed/gitlab-webhook-handler/code-structure)[![Quality Score](https://camo.githubusercontent.com/7a98fa12411f956b36e9e479641a83d32b87678bc2a5723d6baac8e02d6ea109/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f666174696e646565642f6769746c61622d776562686f6f6b2d68616e646c65722e737667)](https://scrutinizer-ci.com/g/fatindeed/gitlab-webhook-handler)[![Total Downloads](https://camo.githubusercontent.com/9862f17663d5c9ce2d7394286815cc6e5b94fd6081779ac177eea1c834e2e883/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f646d2f666174696e646565642f6769746c61622d776562686f6f6b2d68616e646c65722e737667)](https://packagist.org/packages/fatindeed/gitlab-webhook-handler)

Install
-------

[](#install)

```
composer require fatindeed/gitlab-webhook-handler
```

Developer Guide
---------------

[](#developer-guide)

*TODO*

User Guide
----------

[](#user-guide)

### Create Event

[](#create-event)

1. With Secret token

    ```
    use TimoReymann\GitlabWebhookLibrary\Core\Webhook;
    use TimoReymann\GitlabWebhookLibrary\Token\SecretToken;

    $hook = new Webhook(new SecretToken('mySuperSecretToken'));
    $event = $hook->parse();
    ```
2. Without Secret token

    ```
    use TimoReymann\GitlabWebhookLibrary\Event\EventType;

    $eventType = new EventType;
    $event = $eventType->getEventDataFromBody(file_get_contents('php://input'));
    ```

### Sync Handler Example

[](#sync-handler-example)

```
use Fatindeed\GitlabWebhookHandler\EventSubject;

$object = new YourWebhookHandler; // Replace with you webhook handler

$subject = new EventSubject;
$subject->attach($object);
$subject->dispatch($event); // Event created above
```

### Async Handler Example

[](#async-handler-example)

1. Install a Queue Interop compatible transport, for example

    ```
    $ composer require enqueue/fs
    ```

    More Queue Interop compatible transport implementations can be found [here](https://packagist.org/packages/queue-interop/queue-interop).
2. Webhook receiver (Web Server)

    ```
    use Enqueue\Fs\FsConnectionFactory;
    use Fatindeed\GitlabWebhookHandler\EventSubject;

    $context = (new FsConnectionFactory)->createContext(); // Create a filesystem queue

    $subject = new EventSubject;
    $subject->dispatch($event, $context); // Event created above
    ```
3. Daemon process (Run in background)

    ```
    use Enqueue\Fs\FsConnectionFactory;
    use Fatindeed\GitlabWebhookHandler\EventSubject;

    $object = new YourWebhookHandler; // Replace with you webhook handler
    $context = (new FsConnectionFactory)->createContext(); // Create a filesystem queue

    $subject = new EventSubject;
    $subject->signalInstall(SIGTERM, [$subject, 'terminate']); // Alternative
    $subject->attach($object);
    $subject->run($context);
    ```

### With Monolog

[](#with-monolog)

```
use Monolog\Logger;
use Monolog\Handler\StreamHandler;

$logger = new Logger('application');
$logger->pushHandler(new StreamHandler(STDOUT, Logger::INFO));
$subject = new EventSubject($logger);
# code...
```

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity54

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

2522d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/24bf4121bacddbc5b41de57941796c755c941ae02d4c8ea41157eea3a63602b5?d=identicon)[fatindeed](/maintainers/fatindeed)

---

Top Contributors

[![fatindeed](https://avatars.githubusercontent.com/u/168262?v=4)](https://github.com/fatindeed "fatindeed (1 commits)")

---

Tags

gitlabwebhook

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/fatindeed-gitlab-webhook-handler/health.svg)

```
[![Health](https://phpackages.com/badges/fatindeed-gitlab-webhook-handler/health.svg)](https://phpackages.com/packages/fatindeed-gitlab-webhook-handler)
```

###  Alternatives

[producer/producer

Tools for releasing library packages; supports Git, Mercurial, Github, Gitlab, and Bitbucket.

10418.7k2](/packages/producer-producer)[enomotodev/php-cs-fixer-commit

Create commit of php-cs-fixer

18117.3k](/packages/enomotodev-php-cs-fixer-commit)[dintel/php-github-webhook

Simple class for handling GitHub webhook calls

5115.5k](/packages/dintel-php-github-webhook)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

245.2k](/packages/aedart-athenaeum)[ankurk91/laravel-ses-webhooks

Handle AWS SES webhooks in Laravel php framework

2534.2k](/packages/ankurk91-laravel-ses-webhooks)[atakde/discord-webhook-php

discord webhook php

186.5k](/packages/atakde-discord-webhook-php)

PHPackages © 2026

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