PHPackages                             widop/github-hook-provider - 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. widop/github-hook-provider

ActiveLibrary[API Development](/categories/api)

widop/github-hook-provider
==========================

Github WebHook job with Silex

1.0.0(13y ago)5991MITPHP

Since May 4Pushed 11y ago6 watchersCompare

[ Source](https://github.com/widop/WidopGithubHookProvider)[ Packagist](https://packagist.org/packages/widop/github-hook-provider)[ RSS](/packages/widop-github-hook-provider/feed)WikiDiscussions master Synced 2mo ago

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

README
======

[](#readme)

[![Build Status](https://camo.githubusercontent.com/58c4e912078b781c66bb05de5e652bc978f45f7feb1c2d2dfbaf2a5b7aaf900b/68747470733a2f2f7365637572652e7472617669732d63692e6f72672f7769646f702f5769646f70476974687562486f6f6b50726f76696465722e706e67)](http://travis-ci.org/widop/WidopGithubHookProvider)

The library provides a [Silex](https://github.com/fabpot/Silex) provider allowing you to execute your job on any [Github WebHook](https://help.github.com/articles/post-receive-hooks).

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

[](#installation)

The library is distributed through [Composer](https://github.com/composer/composer). So, fist, [install](http://getcomposer.org/doc/00-intro.md#installation-nix) it :)

Create a `composer.json` file at the root directory of you project &amp; put the following inside:

```
{
    "require": {
        "widop/github-hook-provider": "*"
    }
}
```

As the library provides optional debugging, you can enable it by installing &amp; registering the build-in Silex [MonologServiceProvider](http://silex.sensiolabs.org/doc/providers/monolog.html):

```
{
    "require": {
        "widop/github-hook-provider": "*",
        "monolog/monolog": "1.*"
    }
}
```

Then, install the libraries:

```
$ composer install
```

Create your application
-----------------------

[](#create-your-application)

Now, we have everything locally, we can create the Silex application. Usually, we follow the following structure:

```
├── composer.json
├── composer.lock
├── src
│   └── ...
├── vendor
│   └── ...
└── web
    └── hook.php

```

The `web/hook.php` looks like:

```
