PHPackages                             ikwattro/github-event - 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. ikwattro/github-event

ActiveLibrary[API Development](/categories/api)

ikwattro/github-event
=====================

Github Api Public Events to PHP Objects Mapper

1.0.10(10y ago)21161MITPHPPHP ~5.4

Since Jan 17Pushed 10y ago1 watchersCompare

[ Source](https://github.com/ikwattro/github-event)[ Packagist](https://packagist.org/packages/ikwattro/github-event)[ RSS](/packages/ikwattro-github-event/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (5)Versions (16)Used By (1)

GithubEvent Object Mapper
=========================

[](#githubevent-object-mapper)

[![Build Status](https://camo.githubusercontent.com/ea113fdc9d97e83a17ec30036dc79c34a37b5d07d03cadfa1cdf820574704bd5/68747470733a2f2f7472617669732d63692e6f72672f696b77617474726f2f6769746875622d6576656e742e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/ikwattro/github-event)

Github Api Public Events to PHP Objects
---------------------------------------

[](#github-api-public-events-to-php-objects)

Transforms the [Github API Public Events](https://developer.github.com/v3/activity/events/types/) into PHP Objects

### Installation

[](#installation)

Require the library in your `composer.json`

```
composer require ikwattro/github-event
```

### Usage

[](#usage)

#### Building the EventHandler

[](#building-the-eventhandler)

The application need to be built through the factory constructor, currently there is no need for such factory design but it aims to be extensible for future usages.

```
use Ikwattro\GithubEvent\EventHandler;

$eventHandler = EventHandler::create()
                ->build();
```

#### Passing events

[](#passing-events)

The mainpoint of the library is the `handleEvent` method that takes the GithubEvent as argument in an array format (json\_decoded).

Once passed, you'll receive in return the corresponding PHP Object instance corresponding to the event.

```
$events = json_decode('events.json', true);

foreach ($events as $e) {
    $event = $eventHandler->handleEvent($e);
}
```

#### Working with Events

[](#working-with-events)

An event object may contain more than the current event, for e.g., a `CreateEvent` will contain the payload of the event, but also the associated Repository object, RepositoryOwner, ... .

Please refer to the source code for discovering what is inside each event.

#### Currently supported events

[](#currently-supported-events)

- WatchEvent
- IssuesEvent
- IssueCommentEvent
- CreateEvent
- PushEvent
- ForkEvent
- PullRequestEvent

---

### License

[](#license)

The library is licensed under the MIT License

### Author

[](#author)

[Christophe Willemsen](https://github.com/ikwattro)[Twitter: @ikwattro](https://twitter.com/ikwattro)

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity66

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

Recently: every ~32 days

Total

15

Last Release

3976d ago

Major Versions

0.1.3 → 1.0.02015-02-14

### Community

Maintainers

![](https://www.gravatar.com/avatar/c66009f0f147bb7dfcfbbd6837176b2fe6c6e2cdcf82d9ad07ab7d7aa47735f4?d=identicon)[ikwattro](/maintainers/ikwattro)

---

Top Contributors

[![ikwattro](https://avatars.githubusercontent.com/u/1222009?v=4)](https://github.com/ikwattro "ikwattro (38 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/ikwattro-github-event/health.svg)

```
[![Health](https://phpackages.com/badges/ikwattro-github-event/health.svg)](https://phpackages.com/packages/ikwattro-github-event)
```

###  Alternatives

[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.4k5.6M651](/packages/sylius-sylius)[sulu/headless-bundle

Bundle that provides controllers and services for using Sulu as headless content management system

55133.7k2](/packages/sulu-headless-bundle)

PHPackages © 2026

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