PHPackages                             gnello/webhook-manager - 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. gnello/webhook-manager

ActiveLibrary[API Development](/categories/api)

gnello/webhook-manager
======================

Easily associate one or more actions with a specific repository event using webhooks

1.4.0(6y ago)115.9k3MITPHPPHP &gt;=7.0CI failing

Since Sep 24Pushed 6y ago1 watchersCompare

[ Source](https://github.com/gnello/webhook-manager)[ Packagist](https://packagist.org/packages/gnello/webhook-manager)[ Docs](https://github.com/gnello/webhook-manager)[ RSS](/packages/gnello-webhook-manager/feed)WikiDiscussions master Synced 3d ago

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

WebhookManager
==============

[](#webhookmanager)

[![Build Status](https://camo.githubusercontent.com/36fb7129ea3b03e6bfb42ab8056bbc725c24d259ab231da50556fd96597045f9/68747470733a2f2f7472617669732d63692e6f72672f676e656c6c6f2f776562686f6f6b2d6d616e616765722e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/gnello/webhook-manager) [![Latest Stable Version](https://camo.githubusercontent.com/2b338572925832449ae392d91e29a5dcc76d37bde789961ab43f9fbb0a3c38fd/68747470733a2f2f706f7365722e707567782e6f72672f676e656c6c6f2f776562686f6f6b2d6d616e616765722f762f737461626c65)](https://packagist.org/packages/gnello/webhook-manager) [![Scrutinizer Code Quality](https://camo.githubusercontent.com/7da2e07038906f983f04dd45b3fe47d053b9ad4476d22ec157f4a2e59bf97930/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f676e656c6c6f2f776562686f6f6b2d6d616e616765722f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/gnello/webhook-manager/?branch=master) [![Total Downloads](https://camo.githubusercontent.com/68be25572399d4b6931a3cf3b8d56599d5d516468d35d7a3e3d1c25b591bf654/68747470733a2f2f706f7365722e707567782e6f72672f676e656c6c6f2f776562686f6f6b2d6d616e616765722f646f776e6c6f616473)](https://packagist.org/packages/gnello/webhook-manager)

[![Bitbucket](logos/Bitbucket@2x-blue.png)](logos/Bitbucket@2x-blue.png) [![Github](logos/GitHub_Logo.png)](logos/GitHub_Logo.png) [![TravisCI](logos/TravisCI-Full-Color.png)](logos/TravisCI-Full-Color.png)

WebhookManager easily associates one or more actions with a specific repository event using webhooks.
Services supported: Bitbucket, Github, TravisCI and every custom service.

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

[](#installation)

It's highly recommended to use composer to install WebhookManager:

```
composer require gnello/webhook-manager

```

Read more about how to install and use Composer on your local machine [here](https://getcomposer.org/doc/00-intro.md#installation-linux-unix-osx).

Configuration
-------------

[](#configuration)

### On Bitbucket

[](#on-bitbucket)

- Go to the settings of your repository
- Click on "Webhooks" under "Workflow"
- Click on "Add webhook"
- Enter the url of WebhookManager configured on your server (es. )
- Set the triggers
- Save!

### On Github

[](#on-github)

- Go to the settings of your repository
- Click on "Webhooks" under "Options"
- Click on "Add webhook"
- Enter the url of WebhookManager configured on your server (es. )
- Set the content type on `application/json`
- Set the events
- Save!

### On TravisCI

[](#on-travisci)

Add this in your `.travis.yml` file:

```
notifications:
  webhooks: url of WebhookManager configured on your server (es. https://mysite.com/webhooks)

```

### On custom service

[](#on-custom-service)

This is up to you!

Usage
-----

[](#usage)

WebhookManager usage is very simple:

### Bitbucket

[](#bitbucket)

```
require '../vendor/autoload.php';

use \Gnello\WebhookManager\App;
use \Gnello\WebhookManager\Services\BitbucketService;

$webhookManager = new App();

//Action on build passed
$webhookManager->add([BitbucketService::BUILD_STATUS_CREATED, BitbucketService::BUILD_STATUS_UPDATED], function(BitbucketService $service) {
    $payload = $service->getPayload();

    if ($payload['commit_status']['state'] == 'SUCCESSFUL') {
        //do some stuff
    }
});

$webhookManager->listen();
```

### Github

[](#github)

```
require '../vendor/autoload.php';

use \Gnello\WebhookManager\App;
use \Gnello\WebhookManager\Services\GithubService;

$webhookManager = new App(['service' => GithubService::class]);

//Action on push event
$webhookManager->add(GithubService::PUSH, function(GithubService $service) {
    $payload = $service->getPayload();

    //do some stuff
});

$webhookManager->listen();
```

### TravisCI

[](#travisci)

```
require '../vendor/autoload.php';

use \Gnello\WebhookManager\App;
use \Gnello\WebhookManager\Services\TravisCIService;

$webhookManager = new App(['service' => TravisCIService::class]);

//Action on build passed
$webhookManager->add(TravisCIService::PUSH, function(TravisCIService $service) {
    $payload = $service->getPayload();

    if ($payload['state'] === 'passed') {
        //do some stuff
    }
});

$webhookManager->listen();
```

### Custom service

[](#custom-service)

To use a custom service, you should create a class that implements the `\Gnello\WebhookManager\Services\ServiceInterface` interface and then register it on WebhookManager. In WebhookManager options, you should specify that you want to use a custom service.

```
require '../vendor/autoload.php';

use \Gnello\WebhookManager\App;

$webhookManager = new App(['service' => \YourCustomService::class]);

//Action on custom event
$webhookManager->add('custom_event', function(\YourCustomService $service) {
    $payload = $service->getPayload();
    //do some stuff
});

$webhookManager->add('another_event', function(\YourCustomService $service) {
    //do some stuff
});

$webhookManager->listen();
```

Options
-------

[](#options)

- Bitbucket is the default service, but you can change it as follows:

```
//github
$webhookManager = new \Gnello\WebhookManager\App([
    'service' => \Gnello\WebhookManager\Services\GithubService::class
]);

//travis ci
$webhookManager = new \Gnello\WebhookManager\App([
    'service' => \Gnello\WebhookManager\Services\TravisCIService::class
]);

//custom service
$webhookManager = new \Gnello\WebhookManager\App([
    'service' => \Gnello\WebhookManager\Services\YourCustomService::class
]);
```

- The json\_decode of Bitbucket and Github services is set to convert the returned objects into associative arrays. You can change this behavior in this way:

```
$webhookManager = new \Gnello\WebhookManager\App([
    'json_decode_assoc' => false
]);
```

Contact
-------

[](#contact)

-

###  Health Score

33

—

LowBetter than 75% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity26

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity63

Established project with proven stability

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

Recently: every ~161 days

Total

7

Last Release

2510d ago

PHP version history (2 changes)1.0.0PHP &gt;=7

1.4.0PHP &gt;=7.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/3364624b5ca65e5501822875f02a9546c09224ea148f4c3bdf1c81f55f793802?d=identicon)[gnello](/maintainers/gnello)

---

Top Contributors

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

---

Tags

bitbucketdeploygithubtravis-ciwebhookwebhooksbitbucketgithubwebhooktravisci

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/gnello-webhook-manager/health.svg)

```
[![Health](https://phpackages.com/badges/gnello-webhook-manager/health.svg)](https://phpackages.com/packages/gnello-webhook-manager)
```

###  Alternatives

[knplabs/github-api

GitHub API v3 client

2.2k15.8M187](/packages/knplabs-github-api)[kyon147/laravel-shopify

Shopify package for Laravel to aide in app development

473252.9k](/packages/kyon147-laravel-shopify)[bitbucket/client

Bitbucket API 2.0 client for PHP

103765.9k11](/packages/bitbucket-client)[stymiee/authnetjson

Library that abstracts Authorize.Net's JSON APIs. This includes the Advanced Integration Method (AIM), Automated Recurring Billing (ARB), Customer Information Manager (CIM), Transaction Reporting, Simple Integration Method (SIM), and Webhooks.

19545.7k](/packages/stymiee-authnetjson)[kayedspace/laravel-n8n

A complete, expressive, and fluent Laravel client for the n8n public REST API and Webhooks Triggering.

1376.2k1](/packages/kayedspace-laravel-n8n)[jouwweb/sendcloud

Provides a client to interact with the Sendcloud API in an object-oriented way.

16256.9k1](/packages/jouwweb-sendcloud)

PHPackages © 2026

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