phramecms / core
The tiny micro-kernel of PhrameCMS — PSR-11 DI container, topological module loader, PSR-14 event bus, and AI-first operation pipeline.
v0.1.0
2026-12-04 21:00 UTC
Requires
- php: ^8.5
- psr/clock: ^1.0
- psr/container: ^2.0
- psr/event-dispatcher: ^1.0
- psr/log: ^3.0
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.95
- infection/infection: ^0.35.12
- phpstan/phpstan: ^2.1
- phpunit/phpunit: ^13.0
- spaze/phpstan-disallowed-calls: ^4.15
Suggests
None
Provides
None
Conflicts
None
Replaces
None
This package is auto-updated.
Last update: 2026-12-04 21:00:15 UTC
README
The tiny micro-kernel of PhrameCMS — an AI-first, API-native, modular PHP 8.5 CMS.
phramecms/core intentionally contains zero CMS logic: no database layer, no HTTP routing, no users, no configuration storage, and no entity/field system. Everything beyond kernel orchestration is provided by composable modules.
Responsibilities
- PSR-11 Dependency Injection Container with Service Tags: Supports singletons, factories, aliases, and tagged services so modules can register field types, routes, operations, CLI commands, and event listeners without tight coupling.
- Topological Module Loader & Lifecycle: Resolves module dependency graphs deterministically, rejects missing or circular dependencies, and runs clean two-phase booting (
register()->boot()). - PSR-14 Event & Alter Bus: Priority-ordered typed events enabling Drupal-style alterability without global procedural hooks.
- AI-First Operation Pipeline & Contracts:
OperationInterfacewith self-describing JSON Schema for inputs/outputs, required permissions,mutatesState, andsupportsDryRun.- Centralized
OperationBusenforcing Actor/Policy authorization, strict JSON Schema validation, optionalidempotency_keydeduplication, dry-run previewing, and immutable audit emission.
- Kernel Contracts:
ActorInterface(humanvsagent),PolicyEnforcerInterface,AuditLoggerInterface,SchemaValidatorInterface, and PSR-20\Psr\Clock\ClockInterface(SystemClock).
Explicitly Out of Scope
- Database connections or SQL queries (see
phramecms/database) - Configuration persistence or import/export (see
phramecms/config) - HTTP request/response handling or routing (see
phramecms/routing) - Entities, fields, users, REST API, MCP, or CLI (each is its own module)
Dependencies
- PHP
^8.5 psr/clock,psr/container,psr/event-dispatcher,psr/log
Ecosystem
Part of the PhrameCMS multi-repo suite. See PhrameCMS/cms for the starter distribution, architecture docs, and cross-module integration tests.