phramecms / config
Configuration Management (CMI) for PhrameCMS — pluggable storage, canonical JSON/YAML export, schema validation, dry-run diff, and atomic rollback.
Requires
- php: ^8.5
- phramecms/core: ^0.1
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.95
- infection/infection: ^0.35.12
- phpstan/phpstan: ^2.1
- phpunit/phpunit: ^13.0
- phramecms/database: ^0.1
- spaze/phpstan-disallowed-calls: ^4.15
Suggests
- phramecms/database: Required when using DatabaseConfigStorage or DatabaseSnapshotStore
Provides
None
Conflicts
None
Replaces
None
This package is auto-updated.
Last update: 2026-12-04 21:34:34 UTC
README
Drupal-inspired Configuration Management (CMI) module for PhrameCMS, built for deterministic GitOps and safe AI-agent configuration mutations.
Responsibilities
- Active Config Store: Pluggable backend (
DatabaseConfigStorageviaphramecms/databaseorFileConfigStorage) for storing named configuration objects (e.g.,entity.type.content,entity.bundle.content.article,field.storage.content.field_summary). - Deterministic Export & Import: Export active configuration to canonical, sorted JSON/YAML sync files and import from sync directories with stable diffs.
- JSON Schema Validation: Every configuration namespace registers a JSON Schema via service tags (
phrame.config_schema); invalid config is rejected before persisting. - Dry-Run & Diff Preview: Inspect exact additions, modifications, and deletions before mutating active configuration.
- Atomic Apply with Snapshots & Rollback: Every mutation creates an immutable snapshot ID so human operators or AI agents can roll back cleanly (
config.rollback). - Registered Operations:
config.list,config.get,config.set,config.delete,config.diff,config.export,config.import,config.snapshots,config.rollback.
AI-First Design Role
Configuration defines the structure of a PhrameCMS site (entity types, bundles, fields, roles, API exposure). By enforcing JSON Schema validation, dry_run diffs, and automatic snapshots, AI agents can safely evolve site architecture without risking unrecoverable state corruption.
Explicitly Out of Scope
- Storing editorial content records (see
phramecms/entity) - Secret/credential storage (secrets belong in environment variables or dedicated secret providers)
Dependencies
- PHP
^8.5 phramecms/corephramecms/database(optional when using filesystem-only storage)
Ecosystem
Part of the PhrameCMS multi-repo suite. See PhrameCMS/cms for the starter distribution and architecture docs.