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).
Composer-installable, PHP 8.3+, zero I/O — pure interfaces and value objects only.
v0.7.0 — adds the server-settings JSON Schema and the webhook event catalog. Cumulative surface:
Phlix\Shared\Plugin\{LifecycleInterface, Manifest, ManifestType, ManifestValidationError, EventNameMap}Phlix\Shared\Events\{AbstractEvent, Playback\*, Library\*, Auth\*}— 12 event DTOs.Phlix\Shared\Auth\{JwtClaims, ProviderInterface, AuthResult, UserInfo}Phlix\Shared\Hub\{ClaimRequest, ClaimResponse, ServerInfoDto, HeartbeatDto}Phlix\Shared\Relay\{RelayFrameType, RelayWireCodec, RelayFrame}— channel-mux protocol (0.5+).Phlix\Shared\Arr\{BazarrClient, ProwlarrClient, RadarrClient, SonarrClient}— *arr HTTP clients.Phlix\Shared\Schema\SchemaPaths— pure path resolver for the bundledschemas/files (0.7.0+).
The package ships the canonical JSON files used by both phlix-server and the
admin SPA under schemas/ (resolve their absolute paths via
Phlix\Shared\Schema\SchemaPaths):
schemas/manifest.schema.json— JSON Schema (draft 2020-12) for plugin manifests, loaded at runtime byphlix-server'sPhlix\Plugins\Manifest\ManifestSchemavalidator (0.6.0+).schemas/server-settings.schema.json— JSON Schema (draft 2020-12) for the editable server settings (/api/v1/admin/settings); mirrors phlix-server'sAdminSettingsController::ALLOWED_KEYSallow-list and drives the admin SPA settings form (0.7.0+).schemas/webhook-events.json— data catalog of the supported webhook event types for the admin SPA webhook picker. Distinct from the plugin PSR-14 events inEventNameMap(0.7.0+).
The PSR-14 dispatcher wiring (Tukio) and the schema validators stay in
phlix-server and consume this package via Composer.
- 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.
Until detain/phlix-shared is published to Packagist (planned post-v1.0),
consumers require it via a Composer VCS repository entry. Use the HTTPS URL
so CI runners without SSH keys can resolve it:
{
"repositories": [
{
"type": "vcs",
"url": "https://github.com/detain/phlix-shared.git"
}
],
"require": {
"detain/phlix-shared": "^0.6"
}
}Then:
composer update detain/phlix-shareddetain/phlix-server— the Phlix media server (consumes this package).detain/phlix-hub— the multi-server hub + reverse-tunnel relay.
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-devMIT — see LICENSE.