detain / phlex-shared
Shared interfaces, DTOs, event names, and protocol types used by both phlix-server and phlix-hub. Composer-installable, PHP 8.3+, zero I/O.
Requires
- php: ^8.3
- ext-curl: *
- psr/container: ^2.0
- psr/event-dispatcher: ^1.0
- psr/log: ^3.0
Requires (Dev)
- phpstan/phpstan: ^2.0
- phpunit/phpunit: ^10.0
- squizlabs/php_codesniffer: ^3.10
- vimeo/psalm: ^5.0
This package is auto-updated.
Last update: 2026-05-20 05:30:25 UTC
README
Shared interfaces, DTOs, event names, and protocol types used by both
detain/phlix-server (the media server)
and detain/phlix-hub (the multi-server hub, forthcoming). Composer-installable,
PHP 8.3+, zero I/O — pure interfaces and value objects only.
Status
v0.2.0 — Plugin / Events / Auth / Hub namespaces. Shipped:
Phlix\Shared\Plugin\{LifecycleInterface, Manifest, ManifestType, ManifestValidationError, EventNameMap}Phlix\Shared\Events\{AbstractEvent, Playback\*, Library\*, Auth\*}— 12 event DTOs.Phlix\Shared\Auth\JwtClaimsPhlix\Shared\Hub\{ClaimRequest, ClaimResponse, ServerInfoDto, HeartbeatDto}Phlix\Shared\Arr\— namespace reserved for Phase K.1.
The PSR-14 dispatcher wiring (Tukio) and the manifest JSON-Schema
validator stay in phlix-server and consume this package via Composer.
Requirements
- PHP
^8.3 - Composer 2.x
psr/container ^2.0psr/event-dispatcher ^1.0
The package has zero framework dependencies — no Workerman, no Monolog, no Smarty. It is intended to be safely required by any PHP 8.3+ codebase.
Installation
Until detain/phlix-shared is published to Packagist (planned post-v1.0),
consumers require it via a Composer VCS repository entry:
{
"repositories": [
{
"type": "vcs",
"url": "git@github.com:detain/phlix-shared.git"
}
],
"require": {
"detain/phlix-shared": "^0.2"
}
}
Then:
composer update detain/phlix-shared
Related repositories
detain/phlix— the Phlix media server (consumes this package from B.3 onward).detain/phlix-hub— the multi-server hub (forthcoming, B.5+).
Development
composer install ./vendor/bin/phpunit ./vendor/bin/phpstan analyze --no-progress ./vendor/bin/phpcs --standard=PSR12 src/ ./vendor/bin/psalm --no-progress composer validate --strict composer audit --no-dev
License
MIT — see LICENSE.