PHPackages                             dayvsonspacca/beacon-contracts - 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. [PSR &amp; Standards](/categories/psr-standards)
4. /
5. dayvsonspacca/beacon-contracts

ActiveLibrary[PSR &amp; Standards](/categories/psr-standards)

dayvsonspacca/beacon-contracts
==============================

Contracts (client interface and value objects) for the Beacon event platform

v1.0.0(1mo ago)041MITPHPPHP &gt;=8.4

Since Jul 9Pushed 1mo agoCompare

[ Source](https://github.com/dayvsonspacca/php-beacon-contracts)[ Packagist](https://packagist.org/packages/dayvsonspacca/beacon-contracts)[ RSS](/packages/dayvsonspacca-beacon-contracts/feed)WikiDiscussions main Synced 1w ago

READMEChangelogDependencies (3)Versions (2)Used By (1)

beacon-contracts
================

[](#beacon-contracts)

Contracts for the Beacon event platform: the client interface and value objects. No HTTP code — bring your own client, or use [`dayvsonspacca/beacon-guzzle-client`](https://packagist.org/packages/dayvsonspacca/beacon-guzzle-client).

> Developed in the [php-beacon monorepo](https://github.com/dayvsonspacca/php-beacon); this repository is a read-only split.

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

[](#installation)

```
composer require dayvsonspacca/beacon-contracts
```

What's inside
-------------

[](#whats-inside)

- `Beacon\ClientInterface` — `publish(Event): EventId` and `subscribe(): void`
- `Beacon\Event` — topic + data payload, validated on construction
- `Beacon\EventId` — identifier returned by a publish
- `Beacon\Token` — client authentication token

Implementing your own client
----------------------------

[](#implementing-your-own-client)

```
use Beacon\ClientInterface;
use Beacon\Event;
use Beacon\EventId;

final readonly class MyBeaconClient implements ClientInterface
{
    public function publish(Event $event): EventId
    {
        // POST {"topic": $event->topic, "data": $event->data} to your Beacon server
        // and wrap the returned id:
        return new EventId($idFromResponse);
    }

    public function subscribe(): void
    {
        // ...
    }
}
```

License
-------

[](#license)

[MIT](LICENSE)

###  Health Score

40

—

FairBetter than 86% of packages

Maintenance90

Actively maintained with recent releases

Popularity3

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity51

Maturing project, gaining track record

 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

Unknown

Total

1

Last Release

47d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/64930283?v=4)[Dayvson Spacca](/maintainers/dayvsonspacca)[@dayvsonspacca](https://github.com/dayvsonspacca)

---

Top Contributors

[![dayvsonspacca](https://avatars.githubusercontent.com/u/64930283?v=4)](https://github.com/dayvsonspacca "dayvsonspacca (2 commits)")

---

Tags

phpcontractseventspubsubbeacon

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/dayvsonspacca-beacon-contracts/health.svg)

```
[![Health](https://phpackages.com/badges/dayvsonspacca-beacon-contracts/health.svg)](https://phpackages.com/packages/dayvsonspacca-beacon-contracts)
```

###  Alternatives

[symfony/translation-contracts

Generic abstractions related to translation

2.6k765.3M774](/packages/symfony-translation-contracts)[symfony/cache-contracts

Generic abstractions related to caching

2.4k341.3M357](/packages/symfony-cache-contracts)[symfony/http-client-contracts

Generic abstractions related to HTTP clients

2.0k437.3M509](/packages/symfony-http-client-contracts)[symfony/contracts

A set of abstractions extracted out of the Symfony components

3.9k66.4M145](/packages/symfony-contracts)[facade/ignition-contracts

Solution contracts for Ignition

637151.1M168](/packages/facade-ignition-contracts)[dragon-code/contracts

A set of contracts for any project

1010.8M39](/packages/dragon-code-contracts)

PHPackages © 2026

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