Github-Webhook is a simple library to help parse webhook payloads from github. ( https://help.github.com/articles/post-receive-hooks )
This library on it's own does not do anything in particular, it simply provides a convenient method for parsing post receive hook data into a standard structure.
Install via packagist/composer: https://packagist.org/packages/afoozle/github-webhook
<?php
use afoozle\GithubWebhook\EntityMapper\PayloadMapper;
$payloadMapper = new PayloadMapper($payload);
$payload = $payloadMapper->mapFromJson($yourJsonFormattedData);
// or
$payload = $payloadMapper->mapFromDataArray($yourArrayOfData);
var_dump($payload);
- Any flavor of PHP 5.3 or above should do
- [optional] PHPUnit 3.7+ to execute the test suite (phpunit --version)
Bugs and feature request are tracked on GitHub
Matthew Wheeler - [email protected] - http://twitter.com/afoozle
Github-Webhook is licensed under the MIT License - see the LICENSE.txt
file for details