Download the PHP package swop/github-webhook-bundle without Composer
On this page you can find all versions of the php package swop/github-webhook-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package github-webhook-bundle
Github WebHook Bundle
This bundle aiming to reduce complexity when creating GitHub web hooks apps.
Installation
The recommended way to install this bundle is through Composer:
Then, register the bundle into your AppKernel
class. Note that this bundle rely on the SensioFrameworkExtraBundle
bundle in order to work properly.
Usage
Simply use the GitHubWebHook
annotation in your controllers to mark them as GitHub web hook controllers
`
By declaring that your controller is a GitHub web hook, the bundle will make the following actions for you:
-
It will check if the incoming web hook event is supported by your controller. If it's not the case, a
400
JSON response will be automatically returned. -
It will verify that the incoming request has a correct signature, using the web hook specific secret (see "Annotation reference") or the default one (see "Bundle configuration reference"). If the request signature is invalid, a
403
JSON response will be automatically returned. -
It will build a
GitHubEvent
object which will be injected in the controller parameters. - It will manage the serialization of the data you returned in your controller, and thus will send back a
200
JSON response to GitHub.
Configuration
Bundle configuration reference
`
default_secret
: Default secret to use on every hooks when validating the incoming request signature.
Annotation reference
Simple event type handling (will respond only to the push
event):
``
Multiple event types handling (will respond to the push
and pull_request
event):
``
Configure a dedicated secret to use for signature validation: ``
You also can rely on a container parameter to configure the secret to use: ``
Contributing
See CONTRIBUTING file.
Original Credits
- Sylvain MAUDUIT (@Swop) as main author.
License
This library is released under the MIT license. See the complete license in the bundled LICENSE file.
All versions of github-webhook-bundle with dependencies
swop/github-webhook Version ^2.0
psr/http-message Version ^1.0
symfony/psr-http-message-bridge Version ^1.0
zendframework/zend-diactoros Version ^1.3
symfony/http-kernel Version ^2.3|^3.0
symfony/http-foundation Version ^2.3|^3.0
symfony/dependency-injection Version ^2.3|^3.0
symfony/config Version ^2.3|^3.0
symfony/event-dispatcher Version ^2.3|^3.0
sensio/framework-extra-bundle Version ^3.0
psr/log Version ^1.0